Re: [PATCH] PCI: Only call pci_stop_bus_device() one time forchildren devices during removing

From: Jesse Barnes
Date: Mon Dec 05 2011 - 14:35:33 EST


On Tue, 22 Nov 2011 21:06:53 -0800
Yinghai Lu <yinghai.lu@xxxxxxxxxx> wrote:

>
> During debugging pcie hotplug with SRIOV with pcie switch, found
> pci_stop_bus_device() are called several times for some children devices.
>
> Current pci_remove_bus_device() will call pci_stop_bus_device() at first.
> and then use remove_behind_bridge() to call pci_stop_bus_device() for children
> devices. But pci_stop_bus_device() already include depth first to stop children.
> So We can remove unnecessary calling in pci_remove_behind_bridge() for children.
>
> The patch change original pci_remove_bus_device() to __pci_remove_bus_device(), and
> it only do remove work, and new pci_remove_bus_device will call
> pci_stop_bus_device() one time, and then call __pci_remove_bus_device().
>
> Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

applied to linux-next, thanks.

--
Jesse Barnes, Intel Open Source Technology Center

Attachment: signature.asc
Description: PGP signature