Re: [PATCH 2.6.26] PCI: refuse to re-add a device to a bus upon pci_scan_child_bus()
From: Matthew Wilcox
Date: Mon Jul 21 2008 - 15:50:15 EST
On Mon, Jul 21, 2008 at 10:18:19PM +0300, Eran Liberty wrote:
> Dear Penguins,
> As a follow up on my own post ( http://lkml.org/lkml/2008/6/18/195 ), I
> have solved a small bug/misbehavior within the pci_scan_single_device().
To quote your original post here for ease of replying:
> 1. Calling pci_remove_bus_device() on some of the devices on a bus will
> remove them. (ok)
> 2. Calling pci_scan_child_bus() on that bus will scan the bus for
> devices and add them all. even the ones already in the bus device list,
> which will now be duplicated in the bus device list! (no so ok)
I think this is your real problem, that you're rescanning the entire
bus. I don't think that's the route we'd recommend taking.
Why don't you call pci_scan_slot() instead? You won't get the benefit of
pcibios_fixup_bus(), but I'm not convinced that's safe to call on a bus
that's already been scanned.
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/