Re: [PATCH] Make hot unplugging of PCI buses work

Greg KH (greg@kroah.com)
Sun, 23 Feb 2003 22:08:10 -0800


On Sun, Feb 23, 2003 at 04:01:10PM -0500, Scott Murray wrote:
> 1) The description of pci_remove_bus_device says "informing the drivers
> that the device has been removed", yet unless I'm missing some sysfs
> wrinkle, no call will be made to an attached driver's remove callback.

It gets called after device_unregister() is called on the pci device,
through the driver core, and is actually done in the pci_device_remove()
function in driver/pci/pci-driver.c

Hm, I just realized that the pci hotplug drivers were calling the remove
function twice (once on their own, and then through sysfs), this patch
will fix that.

> > Can't you just fix up the current users to use "pci_remove_bus_device()".
> > The breakage seems a bit spiteful ;)
>
> The current device removal code in all of the PCI hotplug drivers are
> based to varying degrees on sets of callbacks driven by the pci_visit_*
> family of functions, and will hence need varying amounts of rework to be
> able to just call pci_remove_bus_device instead. My cPCI hotplug driver
> and the ACPI based driver are likely the easiest to change over, since
> they attempt none of the more sophisticated resource management tricks
> that the Compaq and IBM drivers do.

It shouldn't be that tough to convert the Compaq and IBM drivers, I'll
work on it tonight and test on hardware tomorrow.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/