Fixed suspend/resume for r8169 drivers.
This commit is contained in:
parent
f4623c86fd
commit
97ec7a54f0
|
|
@ -3237,7 +3237,7 @@ static int rtl8169_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
void __iomem *ioaddr = tp->mmio_addr;
|
||||
|
||||
if (tp->ecdev)
|
||||
return;
|
||||
return -EBUSY;
|
||||
|
||||
if (!netif_running(dev))
|
||||
goto out_pci_suspend;
|
||||
|
|
@ -3269,7 +3269,7 @@ static int rtl8169_resume(struct pci_dev *pdev)
|
|||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
if (tp->ecdev)
|
||||
return;
|
||||
return -EBUSY;
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
|
|
|||
|
|
@ -3858,7 +3858,7 @@ static int rtl8169_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
void __iomem *ioaddr = tp->mmio_addr;
|
||||
|
||||
if (tp->ecdev)
|
||||
return;
|
||||
return -EBUSY;
|
||||
|
||||
if (!netif_running(dev))
|
||||
goto out_pci_suspend;
|
||||
|
|
@ -3889,7 +3889,7 @@ static int rtl8169_resume(struct pci_dev *pdev)
|
|||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
if (tp->ecdev)
|
||||
return;
|
||||
return -EBUSY;
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
|
|
|||
|
|
@ -4956,6 +4956,9 @@ static int rtl8169_resume(struct device *device)
|
|||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
struct rtl8169_private *tp = netdev_priv(dev);
|
||||
|
||||
if (tp->ecdev)
|
||||
return -EBUSY;
|
||||
|
||||
rtl8169_init_phy(dev, tp);
|
||||
|
||||
if (netif_running(dev))
|
||||
|
|
|
|||
Loading…
Reference in New Issue