@@ -1396,6 +1396,17 @@ int pci_power_up(struct pci_dev *dev)
else if (state == PCI_D2)
udelay(PCI_PM_D2_DELAY);
+ /*
+ * D3cold -> D0 will have gone through a conventional reset and may need
+ * time to be ready.
+ */
+ if (dev->current_state == PCI_D3cold) {
+ int ret;
+
+ ret = pci_dev_wait(dev, PCI_DEV_WAIT_D3COLD_D0, PCI_RESET_WAIT);
+ if (ret)
+ return ret;
+ }
end:
dev->current_state = PCI_D0;
if (need_restore)
@@ -11,6 +11,7 @@ enum pci_reset_type {
PCI_DEV_WAIT_BUS_RESET,
PCI_DEV_WAIT_RESUME,
PCI_DEV_WAIT_DPC,
+ PCI_DEV_WAIT_D3COLD_D0,
};
/* Number of possible devfns: 0.0 to 1f.7 inclusive */