diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-01-27 10:55:11 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-02-14 08:45:00 -0800 |
commit | 2f5d8e4ff947ad6673397083b48719cd6c59cd61 (patch) | |
tree | 46e1c6901937b7f983b511d6e14498000e2989bb /drivers/pci/hotplug/cpqphp_ctrl.c | |
parent | efdc87dab1cdf25ba631181ac0ead3fb2023dd10 (diff) | |
download | blackbird-op-linux-2f5d8e4ff947ad6673397083b48719cd6c59cd61.tar.gz blackbird-op-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/cpqphp_ctrl.c')
0 files changed, 0 insertions, 0 deletions