Commit 476e7fae authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Jesse Barnes

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 48f67f54
...@@ -1403,10 +1403,11 @@ int pci_restore_standard_config(struct pci_dev *dev) ...@@ -1403,10 +1403,11 @@ int pci_restore_standard_config(struct pci_dev *dev)
if (error) if (error)
return error; return error;
if (pci_is_bridge(dev)) { /*
if (prev_state > PCI_D1) * This assumes that we won't get a bus in B2 or B3 from the BIOS, but
mdelay(PCI_PM_BUS_WAIT); * we've made this assumption forever and it appears to be universally
} else { * satisfied.
*/
switch(prev_state) { switch(prev_state) {
case PCI_D3cold: case PCI_D3cold:
case PCI_D3hot: case PCI_D3hot:
...@@ -1416,7 +1417,6 @@ int pci_restore_standard_config(struct pci_dev *dev) ...@@ -1416,7 +1417,6 @@ int pci_restore_standard_config(struct pci_dev *dev)
udelay(PCI_PM_D2_DELAY); udelay(PCI_PM_D2_DELAY);
break; break;
} }
}
dev->current_state = PCI_D0; dev->current_state = PCI_D0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment