[rtems-libbsd commit] PCI(4): Disable unsupported features

Sebastian Huber sebh at rtems.org
Mon Sep 23 09:01:24 UTC 2019


Module:    rtems-libbsd
Branch:    master
Commit:    b1529329536381c58de2d50bbc8bc803debc4ab9
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=b1529329536381c58de2d50bbc8bc803debc4ab9

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep 11 14:10:34 2019 +0200

PCI(4): Disable unsupported features

---

 freebsd/sys/dev/pci/pci.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/freebsd/sys/dev/pci/pci.c b/freebsd/sys/dev/pci/pci.c
index ae9c90d..f2a46d0 100644
--- a/freebsd/sys/dev/pci/pci.c
+++ b/freebsd/sys/dev/pci/pci.c
@@ -133,8 +133,10 @@ static void		pci_resume_msi(device_t dev);
 static void		pci_resume_msix(device_t dev);
 static int		pci_remap_intr_method(device_t bus, device_t dev,
 			    u_int irq);
+#ifndef __rtems__
 static void		pci_hint_device_unit(device_t acdev, device_t child,
 			    const char *name, int *unitp);
+#endif /* __rtems__ */
 
 static int		pci_get_id_method(device_t dev, device_t child,
 			    enum pci_id_type type, uintptr_t *rid);
@@ -174,7 +176,9 @@ static device_method_t pci_methods[] = {
 	DEVMETHOD(bus_child_detached,	pci_child_detached),
 	DEVMETHOD(bus_child_pnpinfo_str, pci_child_pnpinfo_str_method),
 	DEVMETHOD(bus_child_location_str, pci_child_location_str_method),
+#ifndef __rtems__
 	DEVMETHOD(bus_hint_device_unit,	pci_hint_device_unit),
+#endif /* __rtems__ */
 	DEVMETHOD(bus_remap_intr,	pci_remap_intr_method),
 	DEVMETHOD(bus_suspend_child,	pci_suspend_child),
 	DEVMETHOD(bus_resume_child,	pci_resume_child),
@@ -3405,7 +3409,9 @@ pci_assign_interrupt(device_t bus, device_t dev, int force_route)
 {
 	struct pci_devinfo *dinfo = device_get_ivars(dev);
 	pcicfgregs *cfg = &dinfo->cfg;
+#ifndef __rtems__
 	char tunable_name[64];
+#endif /* __rtems__ */
 	int irq;
 
 	/* Has to have an intpin to have an interrupt. */
@@ -4436,6 +4442,7 @@ pci_detach(device_t dev)
 	return (device_delete_children(dev));
 }
 
+#ifndef __rtems__
 static void
 pci_hint_device_unit(device_t dev, device_t child, const char *name, int *unitp)
 {
@@ -4460,6 +4467,7 @@ pci_hint_device_unit(device_t dev, device_t child, const char *name, int *unitp)
 		return;
 	}
 }
+#endif /* __rtems__ */
 
 static void
 pci_set_power_child(device_t dev, device_t child, int state)
@@ -4591,6 +4599,7 @@ pci_resume(device_t dev)
 static void
 pci_load_vendor_data(void)
 {
+#ifndef __rtems__
 	caddr_t data;
 	void *ptr;
 	size_t sz;
@@ -4606,6 +4615,7 @@ pci_load_vendor_data(void)
 			pci_vendordata[pci_vendordata_size] = '\n';
 		}
 	}
+#endif /* __rtems__ */
 }
 
 void



More information about the vc mailing list