| @@ -999,7 +999,7 @@ static void __pci_start_power_transition(struct pci_dev *dev, pci_power_t state) · 998 unmodified lines |
| 999 | * because have already delayed for the bridge. | 999 | * because have already delayed for the bridge. |
| 1000 | */ | 1000 | */ |
| 1001 | if (dev->runtime_d3cold) { | 1001 | if (dev->runtime_d3cold) { |
| 1002 | if (dev->d3cold_delay) | 1002 | if (dev->d3cold_delay && !dev->imm_ready) |
| 1003 | msleep(dev->d3cold_delay); | 1003 | msleep(dev->d3cold_delay); |
| 1004 | /* | 1004 | /* |
| 1005 | * When powering on a bridge from D3cold, the | 1005 | * When powering on a bridge from D3cold, the |
| @@ -2644,6 +2644,7 @@ EXPORT_SYMBOL_GPL(pci_d3cold_disable); · 1638 unmodified lines |
| 2644 | void pci_pm_init(struct pci_dev *dev) | 2644 | void pci_pm_init(struct pci_dev *dev) |
| 2645 | { | 2645 | { |
| 2646 | int pm; | 2646 | int pm; |
| | 2647 | u16 status; |
| 2647 | u16 pmc; | 2648 | u16 pmc; |
| 2648 | | 2649 | |
| 2649 | pm_runtime_forbid(&dev->dev); | 2650 | pm_runtime_forbid(&dev->dev); |
| @@ -2706,6 +2707,10 @@ void pci_pm_init(struct pci_dev *dev) · 56 unmodified lines |
| 2706 | /* Disable the PME# generation functionality */ | 2707 | /* Disable the PME# generation functionality */ |
| 2707 | pci_pme_active(dev, false); | 2708 | pci_pme_active(dev, false); |
| 2708 | } | 2709 | } |
| | 2710 | |
| | 2711 | pci_read_config_word(dev, PCI_STATUS, &status); |
| | 2712 | if (status & PCI_STATUS_IMM_READY) |
| | 2713 | dev->imm_ready = 1; |
| 2709 | } | 2714 | } |
| 2710 | | 2715 | |
| 2711 | static unsigned long pci_ea_flags(struct pci_dev *dev, u8 prop) | 2716 | static unsigned long pci_ea_flags(struct pci_dev *dev, u8 prop) |
| @@ -4376,6 +4381,9 @@ int pcie_flr(struct pci_dev *dev) · 1664 unmodified lines |
| 4376 | | 4381 | |
| 4377 | pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); | 4382 | pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); |
| 4378 | | 4383 | |
| | 4384 | if (dev->imm_ready) |
| | 4385 | return 0; |
| | 4386 | |
| 4379 | /* | 4387 | /* |
| 4380 | * Per PCIe r4.0, sec 6.6.2, a device must complete an FLR within | 4388 | * Per PCIe r4.0, sec 6.6.2, a device must complete an FLR within |
| 4381 | * 100ms, but may silently discard requests while the FLR is in | 4389 | * 100ms, but may silently discard requests while the FLR is in |
| @@ -4417,6 +4425,9 @@ static int pci_af_flr(struct pci_dev *dev, int probe) · 35 unmodified lines |
| 4417 | | 4425 | |
| 4418 | pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR); | 4426 | pci_write_config_byte(dev, pos + PCI_AF_CTRL, PCI_AF_CTRL_FLR); |
| 4419 | | 4427 | |
| | 4428 | if (dev->imm_ready) |
| | 4429 | return 0; |
| | 4430 | |
| 4420 | /* | 4431 | /* |
| 4421 | * Per Advanced Capabilities for Conventional PCI ECN, 13 April 2006, | 4432 | * Per Advanced Capabilities for Conventional PCI ECN, 13 April 2006, |
| 4422 | * updated 27 July 2006; a device must complete an FLR within | 4433 | * updated 27 July 2006; a device must complete an FLR within |