From: Yinghai Lu Date: Tue, 7 May 2013 20:35:44 +0000 (-0600) Subject: PCI: Delay final fixups until resources are assigned X-Git-Tag: v3.10-rc1~35^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e253aaf0af51c1e4dc7dd3b26ea8e666bf9a2d8d;p=pandora-kernel.git PCI: Delay final fixups until resources are assigned Commit 4f535093cf "PCI: Put pci_dev in device tree as early as possible" moved final fixups from pci_bus_add_device() to pci_device_add(). But pci_device_add() happens before resource assignment, so BARs may not be valid yet. Typical flow for hot-add: pciehp_configure_device pci_scan_slot pci_scan_single_device pci_device_add pci_fixup_device(pci_fixup_final, dev) # previous location # resource assignment happens here pci_bus_add_devices pci_bus_add_device pci_fixup_device(pci_fixup_final, dev) # new location [bhelgaas: changelog, move fixups to pci_bus_add_device()] Reference: https://lkml.kernel.org/r/20130415182614.GB9224@xanatos Reported-by: David Bulkow Tested-by: David Bulkow Signed-off-by: Yinghai Lu Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v3.9+ --- Reading git-diff-tree failed