diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2014-06-30 20:38:36 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 04:06:52 +0400 |
commit | e697b16b47d1c6d63859cfd44cecb888c7dde92f (patch) | |
tree | 6c5bffb6e8dd92755a5367165b4ab3f213c48c6b /drivers/net/ethernet/ti | |
parent | 7a72eddc8e943a96afc86264e095f5b1d037ed4a (diff) | |
download | linux-e697b16b47d1c6d63859cfd44cecb888c7dde92f.tar.xz |
tlan: Enable device at resume
pci_disable_device() is called in _suspend but there's no corresponding
pci_enable_device() in _resume.
This causes "disabling already-disabled device" warning on 2nd suspend.
Add pci_enable_device() call to _resume to fix this problem.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/tlan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index 50ac9e7b927f..1f21764fea53 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c @@ -365,8 +365,10 @@ static int tlan_suspend(struct pci_dev *pdev, pm_message_t state) static int tlan_resume(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); + int rc = pci_enable_device(pdev); - pci_set_power_state(pdev, PCI_D0); + if (rc) + return rc; pci_restore_state(pdev); pci_enable_wake(pdev, PCI_D0, 0); netif_device_attach(dev); |