summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>2015-05-07 16:59:20 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:44:55 +0900
commit972a88163796f314c76a7602037e6b09e1487367 (patch)
tree04de71974338b141070107c6410ee3959cfb5877 /drivers/net
parentdc4081ce913a5862a2131d0dd0467924ae6fed91 (diff)
local/net: bcm4358: During resuming first power up PCIE
When resuming the device do the "suspend" in exactly reversed order, so first set PCI power state to PCI_D0, then restore its state and enable device. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/bcmdhd4358/dhd_pcie_linux.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/bcmdhd4358/dhd_pcie_linux.c b/drivers/net/wireless/bcmdhd4358/dhd_pcie_linux.c
index 8f4da7ff9849..2e4bbdcb9d30 100644
--- a/drivers/net/wireless/bcmdhd4358/dhd_pcie_linux.c
+++ b/drivers/net/wireless/bcmdhd4358/dhd_pcie_linux.c
@@ -255,7 +255,14 @@ static int dhdpcie_suspend_dev(struct pci_dev *dev)
static int dhdpcie_resume_dev(struct pci_dev *dev)
{
int err = 0;
+
DHD_TRACE_HW4(("%s: Enter\n", __FUNCTION__));
+
+ err = pci_set_power_state(dev, PCI_D0);
+ if (err) {
+ printf("%s:pci_set_power_state error %d \n", __FUNCTION__, err);
+ return err;
+ }
pci_restore_state(dev);
err = pci_enable_device(dev);
if (err) {
@@ -263,11 +270,7 @@ static int dhdpcie_resume_dev(struct pci_dev *dev)
return err;
}
pci_set_master(dev);
- err = pci_set_power_state(dev, PCI_D0);
- if (err) {
- printf("%s:pci_set_power_state error %d \n", __FUNCTION__, err);
- return err;
- }
+
#ifndef BCMPCIE_OOB_HOST_WAKE
dhdpcie_pme_active(dev, FALSE);
#endif /* BCMPCIE_OOB_HOST_WAKE */