WORKAROUND: usb: gadget: composite: Set usb_req len with additional bytes
[platform/kernel/linux-starfive.git] / drivers / pci / pci-driver.c
index a79c110..51ec9e7 100644 (file)
@@ -572,7 +572,19 @@ static void pci_pm_default_resume_early(struct pci_dev *pci_dev)
 
 static void pci_pm_bridge_power_up_actions(struct pci_dev *pci_dev)
 {
-       pci_bridge_wait_for_secondary_bus(pci_dev, "resume");
+       int ret;
+
+       ret = pci_bridge_wait_for_secondary_bus(pci_dev, "resume");
+       if (ret) {
+               /*
+                * The downstream link failed to come up, so mark the
+                * devices below as disconnected to make sure we don't
+                * attempt to resume them.
+                */
+               pci_walk_bus(pci_dev->subordinate, pci_dev_set_disconnected,
+                            NULL);
+               return;
+       }
 
        /*
         * When powering on a bridge from D3cold, the whole hierarchy may be