Skip to content

Commit f044baa

Browse files
committed
PCI/PM: Adjust pcie_wait_for_link_delay() for caller delay
The caller of pcie_wait_for_link_delay() specifies the time to wait after the link becomes active. When the downstream port doesn't support link active reporting, obviously we can't tell when the link becomes active, so we waited the worst-case time (1000 ms) plus 100 ms, ignoring the delay from the caller. Instead, wait for 1000 ms + the delay from the caller. Fixes: 4827d63 ("PCI/PM: Add pcie_wait_for_link_delay()") Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 68f5fc4 commit f044baa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4675,10 +4675,10 @@ static bool pcie_wait_for_link_delay(struct pci_dev *pdev, bool active,
46754675

46764676
/*
46774677
* Some controllers might not implement link active reporting. In this
4678-
* case, we wait for 1000 + 100 ms.
4678+
* case, we wait for 1000 ms + any delay requested by the caller.
46794679
*/
46804680
if (!pdev->link_active_reporting) {
4681-
msleep(1100);
4681+
msleep(timeout + delay);
46824682
return true;
46834683
}
46844684

0 commit comments

Comments
 (0)