From: Yijing Wang Date: Tue, 15 Jan 2013 03:12:19 +0000 (+0800) Subject: PCI: pciehp: Iterate over all devices in slot, not functions 0-7 X-Git-Tag: v3.9-rc1~82^2~9^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba518e3c177547dfebf7fa7252cea0c850e7ce25;p=pandora-kernel.git PCI: pciehp: Iterate over all devices in slot, not functions 0-7 Currently, we enumerate devices in a slot with pci_scan_slot(), then iterate through all the devices we found by looking for functions 0-7. But that's wrong for ARI devices, which may have function numbers up to 255. This means that when we hot-add an ARI device, pciehp only initializes functions 0-7, and other functions don't work correctly. Additionally, if we hot-remove the device, pciehp only removes functions 0-7, leaving stale pci_dev structures for any other functions. This patch fixes the problem by iterating over devices in a slot by using the upstream bridge's "bus->devices" list instead. [bhelgaas: changelog] Signed-off-by: Yijing Wang Signed-off-by: Bjorn Helgaas --- Reading git-diff-tree failed