pciconf fails: patch to pci.c

Rob Schulhof rrs at mx1.net
Mon Feb 23 20:20:24 PST 2004


Hi,

  I noticed that the PCI bus code never calls make_dev for the pci
userland device, causing pciconf to fail with a "device not configured"
error.  I attached a patch which fixes the problem for me, but is probably
the wrong approach:) Hope it helps...

Thanks!

Rob
--- src/sys/bus/pci/pci.c	Mon Feb 23 19:14:59 2004
+++ src/sys/bus/pci/pci.c.orig	Mon Feb 23 19:14:10 2004
@@ -1385,9 +1385,6 @@
         if (bootverbose)
                 device_printf(dev, "physical bus=%d\n", busno);
 
-        if (busno == 0 )
-        	make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci");
-
         pci_add_children(dev, busno, sizeof(struct pci_devinfo));
 
         return (bus_generic_attach(dev));




More information about the Bugs mailing list