Skip to content

Commit 476e7fa

Browse files
rjwysockijbarnes993
authored andcommitted
PCI PM: Do not wait for buses in B2 or B3 during resume
pci_restore_standard_config() adds extra delay for PCI buses in low power states (B2 or B3), but this is only correct for buses in B2, because the buses in B3 are reset when they are put back into B0. Thus we should wait for such buses to settle after the reset, but it's not a good idea to wait that long (1.1 s) with interrupts off. On the other hand, we have never waited for buses in B2 and B3 during resume and it seems reasonable to go back to this well tested behaviour. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent 48f67f5 commit 476e7fa

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

‎drivers/pci/pci.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,19 +1403,19 @@ int pci_restore_standard_config(struct pci_dev *dev)
14031403
if (error)
14041404
return error;
14051405

1406-
if (pci_is_bridge(dev)) {
1407-
if (prev_state > PCI_D1)
1408-
mdelay(PCI_PM_BUS_WAIT);
1409-
} else {
1410-
switch(prev_state) {
1411-
case PCI_D3cold:
1412-
case PCI_D3hot:
1413-
mdelay(pci_pm_d3_delay);
1414-
break;
1415-
case PCI_D2:
1416-
udelay(PCI_PM_D2_DELAY);
1417-
break;
1418-
}
1406+
/*
1407+
* This assumes that we won't get a bus in B2 or B3 from the BIOS, but
1408+
* we've made this assumption forever and it appears to be universally
1409+
* satisfied.
1410+
*/
1411+
switch(prev_state) {
1412+
case PCI_D3cold:
1413+
case PCI_D3hot:
1414+
mdelay(pci_pm_d3_delay);
1415+
break;
1416+
case PCI_D2:
1417+
udelay(PCI_PM_D2_DELAY);
1418+
break;
14191419
}
14201420

14211421
dev->current_state = PCI_D0;

0 commit comments

Comments
 (0)