bogus changes for generic pci_scan_slot() in ameslab-2.5

Olaf Hering olh at suse.de
Thu Dec 11 03:45:53 EST 2003


 On Tue, Dec 02, Jake Moilanen wrote:

> This looks like the workaround for the pci multifunc problem that is
> seen on LPARs.  The linux-2.6-pcibios-scan-all-fns-1.patch I posted in
> the JS20 support email fixes the same problem, does not break ppc32, and
> should probably used instead.

I have tried this patch on the beige g3 and it booted ok. The one below
should be reverted from ameslab.

> On Fri, 2003-11-28 at 09:41, Olaf Hering wrote:
> > Good morning,
> >
> > what is the purpose of this change?
> >
> >
> > diff -purN linux-2.5/drivers/pci/probe.c linuxppc64-2.5/drivers/pci/probe.c
> > --- linux-2.5/drivers/pci/probe.c	2003-08-06 15:34:30.000000000 +0000
> > +++ linuxppc64-2.5/drivers/pci/probe.c	2003-11-05 22:12:33.000000000 +0000
> > @@ -552,6 +552,7 @@ int __devinit pci_scan_slot(struct pci_b
> >  		struct pci_dev *dev;
> >
> >  		dev = pci_scan_device(bus, devfn);
> > +#if 0
> >  		if (func == 0) {
> >  			if (!dev)
> >  				break;
> > @@ -560,6 +561,10 @@ int __devinit pci_scan_slot(struct pci_b
> >  				continue;
> >  			dev->multifunction = 1;
> >  		}
> > +#else
> > +		if (!dev)
> > +			continue;
> > +#endif
> >
> >  		/* Fix up broken headers */
> >  		pci_fixup_device(PCI_FIXUP_HEADER, dev);
> >
> > It breaks on ppc32, B&W G3, dies in indirect_read_config() because the
> > pointer *cfg_data becomes bogus, devfn is > 0xff (no idea if that
> > matters).
> >
> > turning #if 0 into #if 1 cures it. I havent tried it on other systems
> > yet, but at least a PReP MTX+ works with the patch above.
> >
> >
> >
> > --
> > USB is for mice, FireWire is for men!
> >
> > sUse lINUX ag, nÜRNBERG
> >
>

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list