pciconf fails: patch to pci.c
Rob Schulhof
rrs at mx1.net
Tue Feb 24 09:37:05 PST 2004
Hello Jeroen,
I'm very sorry for the botched patch, and bounced email. I'm working on
making my MTA friendlier, but I can also be reached at
rrschoolie at xxxxxxxxx
Attached, is the patch I meant to send.
Thanks,
Rob
On Tue, 24 Feb 2004, Jeroen Ruigrok/asmodai wrote:
> From: Jeroen Ruigrok/asmodai <asmodai at xxxxxx>
> Subject: Re: pciconf fails: patch to pci.c
> Date: Tue, 24 Feb 2004 08:30:17 +0100
> To: bugs at xxxxxxxxxxxxxxxxxxxxxxx
>
> -On [20040224 05:32], Rob Schulhof (rrs at xxxxxxx) wrote:
> > 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...
>
> Am I correct into think this patch is in the reverse order? I.e.: you
> meant to ADD the make_dev call, not remove it?
>
> >--- 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));
>
>
> --
> Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
> PGP fingerprint: 2D92 980E 45FE 2C28 9DB7 9D88 97E6 839B 2EAC 625B
> http://www.tendra.org/ | http://diary.in-nomine.org/
> >From here, what you see you become...
>
--- src/sys/bus/pci/pci.c.orig Mon Feb 23 19:14:10 2004
+++ src/sys/bus/pci/pci.c Mon Feb 23 19:14:59 2004
@@ -1385,6 +1385,9 @@
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