Re: [PATCH] PCI fixes for 2.6.10-rc1

Russell King
2004-11-13T10:22:13Z

On Sat, Nov 13, 2004 at 11:03:15AM +0100, Jan Dittmer wrote:
> Russell King wrote:
> > Why is this needed? pci_bus_add_devices() is designed to only add new
> > devices to the device tree - new devices have an empty dev->global_list.
> >
> > Just calling pci_bus_add_devices() for the parent bus should suffice.
>
> The device got removed from bus->devices, so I can't call that.

This sounds very wrong. Why did it get removed from bus->devices ?

If it isn't on bus->devices, how does pci_bus_add_device() help?
Sure you get it onto the global list and into the device tree,
but it won't be attached to the parent bus properly.

I think what you want to be using is:

int __devinit pci_scan_slot(struct pci_bus *bus, int devfn)

to discover the new device, which will do the right thing from the
point of setting stuff up before calling pci_bus_add_device*().

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core