|
@@ -1675,33 +1675,24 @@ static void rtl_link_chg_patch(struct rtl8169_private *tp)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void __rtl8169_check_link_status(struct net_device *dev,
|
|
|
|
|
- struct rtl8169_private *tp,
|
|
|
|
|
- void __iomem *ioaddr, bool pm)
|
|
|
|
|
|
|
+static void rtl8169_check_link_status(struct net_device *dev,
|
|
|
|
|
+ struct rtl8169_private *tp,
|
|
|
|
|
+ void __iomem *ioaddr)
|
|
|
{
|
|
{
|
|
|
if (tp->link_ok(ioaddr)) {
|
|
if (tp->link_ok(ioaddr)) {
|
|
|
rtl_link_chg_patch(tp);
|
|
rtl_link_chg_patch(tp);
|
|
|
/* This is to cancel a scheduled suspend if there's one. */
|
|
/* This is to cancel a scheduled suspend if there's one. */
|
|
|
- if (pm)
|
|
|
|
|
- pm_request_resume(&tp->pci_dev->dev);
|
|
|
|
|
|
|
+ pm_request_resume(&tp->pci_dev->dev);
|
|
|
netif_carrier_on(dev);
|
|
netif_carrier_on(dev);
|
|
|
if (net_ratelimit())
|
|
if (net_ratelimit())
|
|
|
netif_info(tp, ifup, dev, "link up\n");
|
|
netif_info(tp, ifup, dev, "link up\n");
|
|
|
} else {
|
|
} else {
|
|
|
netif_carrier_off(dev);
|
|
netif_carrier_off(dev);
|
|
|
netif_info(tp, ifdown, dev, "link down\n");
|
|
netif_info(tp, ifdown, dev, "link down\n");
|
|
|
- if (pm)
|
|
|
|
|
- pm_schedule_suspend(&tp->pci_dev->dev, 5000);
|
|
|
|
|
|
|
+ pm_schedule_suspend(&tp->pci_dev->dev, 10000);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static void rtl8169_check_link_status(struct net_device *dev,
|
|
|
|
|
- struct rtl8169_private *tp,
|
|
|
|
|
- void __iomem *ioaddr)
|
|
|
|
|
-{
|
|
|
|
|
- __rtl8169_check_link_status(dev, tp, ioaddr, false);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
#define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)
|
|
#define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | WAKE_MCAST)
|
|
|
|
|
|
|
|
static u32 __rtl8169_get_wol(struct rtl8169_private *tp)
|
|
static u32 __rtl8169_get_wol(struct rtl8169_private *tp)
|
|
@@ -7746,7 +7737,7 @@ static void rtl_slow_event_work(struct rtl8169_private *tp)
|
|
|
rtl8169_pcierr_interrupt(dev);
|
|
rtl8169_pcierr_interrupt(dev);
|
|
|
|
|
|
|
|
if (status & LinkChg)
|
|
if (status & LinkChg)
|
|
|
- __rtl8169_check_link_status(dev, tp, tp->mmio_addr, true);
|
|
|
|
|
|
|
+ rtl8169_check_link_status(dev, tp, tp->mmio_addr);
|
|
|
|
|
|
|
|
rtl_irq_enable_all(tp);
|
|
rtl_irq_enable_all(tp);
|
|
|
}
|
|
}
|