Function rtl8169_rx_missed() does nothing on MAC versions > 06,
therefore remove it.

Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
 drivers/net/ethernet/realtek/r8168.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8168.c 
b/drivers/net/ethernet/realtek/r8168.c
index 0ce789814..0ba0ac5ec 100644
--- a/drivers/net/ethernet/realtek/r8168.c
+++ b/drivers/net/ethernet/realtek/r8168.c
@@ -7401,21 +7401,9 @@ static int rtl8169_poll(struct napi_struct *napi, int 
budget)
        return work_done;
 }
 
-static void rtl8169_rx_missed(struct net_device *dev, void __iomem *ioaddr)
-{
-       struct rtl8169_private *tp = netdev_priv(dev);
-
-       if (tp->mac_version > RTL_GIGA_MAC_VER_06)
-               return;
-
-       dev->stats.rx_missed_errors += (RTL_R32(RxMissed) & 0xffffff);
-       RTL_W32(RxMissed, 0);
-}
-
 static void rtl8169_down(struct net_device *dev)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
-       void __iomem *ioaddr = tp->mmio_addr;
 
        del_timer_sync(&tp->timer);
 
@@ -7423,12 +7411,6 @@ static void rtl8169_down(struct net_device *dev)
        netif_stop_queue(dev);
 
        rtl8169_hw_reset(tp);
-       /*
-        * At this point device interrupts can not be enabled in any function,
-        * as netif_running is not true (rtl8169_interrupt, rtl8169_reset_task)
-        * and napi is disabled (rtl8169_poll).
-        */
-       rtl8169_rx_missed(dev, ioaddr);
 
        /* Give a racing hard_start_xmit a few cycles to complete. */
        synchronize_sched();
@@ -7568,16 +7550,12 @@ static void
 rtl8169_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
-       void __iomem *ioaddr = tp->mmio_addr;
        struct pci_dev *pdev = tp->pci_dev;
        struct rtl8169_counters *counters = tp->counters;
        unsigned int start;
 
        pm_runtime_get_noresume(&pdev->dev);
 
-       if (netif_running(dev) && pm_runtime_active(&pdev->dev))
-               rtl8169_rx_missed(dev, ioaddr);
-
        do {
                start = u64_stats_fetch_begin_irq(&tp->rx_stats.syncp);
                stats->rx_packets = tp->rx_stats.packets;
@@ -7697,7 +7675,6 @@ static int rtl8169_runtime_suspend(struct device *device)
        rtl8169_net_suspend(dev);
 
        /* Update counters before going runtime suspend */
-       rtl8169_rx_missed(dev, tp->mmio_addr);
        rtl8169_update_counters(dev);
 
        return 0;
-- 
2.15.1


Reply via email to