summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
authorYinghai Lu2012-01-27 19:55:11 +0100
committerJesse Barnes2012-02-14 17:45:00 +0100
commit2f5d8e4ff947ad6673397083b48719cd6c59cd61 (patch)
tree46e1c6901937b7f983b511d6e14498000e2989bb /drivers/pci/hotplug/pciehp_ctrl.c
parentPCI: Separate pci_bus_read_dev_vendor_id from pci_scan_device (diff)
downloadkernel-qcow2-linux-2f5d8e4ff947ad6673397083b48719cd6c59cd61.tar.gz
kernel-qcow2-linux-2f5d8e4ff947ad6673397083b48719cd6c59cd61.tar.xz
kernel-qcow2-linux-2f5d8e4ff947ad6673397083b48719cd6c59cd61.zip
PCI: pciehp: replace unconditional sleep with config space access check
During reviewing | PCI: pciehp: wait 1000 ms before Link Training check Linus said: >... > That's a *long* time, and it's irritating to the user. It makes the > user think "the machine is slow". >... > And quite frankly, an unconditional one-second delay here seems bad. >Two seconds was unacceptable, one second is just bad. Try to access the pci conf of a pci device that is supposed to show up in 1s. If we can read back a valid vendor/device id, we can return early. Related discussion could be found: https://lkml.org/lkml/2011/12/6/339 -v2: seperate code to pci_bus_read_dev_vendor_id() from pci_scan_device() and reuse it from pciehp code. Suggested by Matthew Wilcox. -v3: According to Kenj, don't use array in stack, and don't wait too long for crs, also return fail status if not found. Also separate pci_bus_dev_read_vendor_id() change to another patch. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
0 files changed, 0 insertions, 0 deletions