]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal
authorTyrel Datwyler <tyreld@linux.vnet.ibm.com>
Tue, 29 Jul 2014 17:48:13 +0000 (13:48 -0400)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 5 Aug 2014 05:40:58 +0000 (15:40 +1000)
commit1a61ce2a3df2ebdd049776a82d3e46cd95f6b0bd
tree490fd87f77d28b50fd9b643c66bcfcab77f83195
parent66308cc6f550378eb3bca3f5308ea4fc8324e411
powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal

Commit 6521213 made __sysfs_remove_dir() recursive and introduced a BUG_ON
during PHB removal while attempting to delete the power managment attribute
group of the bus. This is a result of tearing the bridge and bus devices down
out of order in remove_phb_dynamic. Since, the the bus resides below the bridge
in the sysfs device tree it should be torn down first.

This patch simply moves the device_unregister call for the PHB bridge device
after the device_unregister call for the PHB bus.

Fixes: 6521213b3428 ("sysfs: make __sysfs_remove_dir() recursive")
Cc: stable@vger.kernel.org
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/pci_dlpar.c