arm: tegra: pcie: Fix USB3 after LP0
Jay Agarwal [Fri, 22 Jun 2012 12:03:51 +0000 (17:03 +0530)]
Stop and add pcie devices to probe the devices
again in order to have correct value of irq which
was not, at first probe while resume.

Bug 956573

Change-Id: I8d497116350ad263c4ae3053cd429393a0f0bc99
Signed-off-by: Jay Agarwal <jagarwal@nvidia.com>
Reviewed-on: http://git-master/r/110556
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/pcie.c

index 6b23f7d..4e266be 100644 (file)
@@ -1380,6 +1380,14 @@ static int tegra_pci_resume(struct device *dev)
                pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, pdev->irq);
        }
 
+       /* probe the devices again after having correct value of irq as above */
+       pdev = NULL;
+       for_each_pci_dev(pdev)
+               pci_stop_bus_device(pdev);
+       b = NULL;
+       while ((b = pci_find_next_bus(b)) != NULL)
+               pci_bus_add_devices(b);
+
        return ret;
 }
 #endif