]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: wangxun: avoid statistics updates during device teardown
authorJiawen Wu <jiawenwu@trustnetic.com>
Mon, 25 May 2026 10:05:42 +0000 (18:05 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 28 May 2026 09:51:51 +0000 (11:51 +0200)
After introducing WX_STATE_DOWN, wx_update_stats() now explicitly skips
statistics collection while the device is in teardown or reset state.
Calling wx_update_stats() from the device disable path therefore becomes
redundant.

Remove wx_update_stats() calls from ngbe_disable_device() and
txgbe_disable_device().

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/20260525100543.27140-3-jiawenwu@trustnetic.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c

index f4a2dd6fa4930aa22b54dc2f58c026874e78ed6d..8678c49b892ab364f551902946a84106ab41c5f3 100644 (file)
@@ -404,8 +404,6 @@ static void ngbe_disable_device(struct wx *wx)
 
                wr32(wx, WX_PX_TR_CFG(reg_idx), WX_PX_TR_CFG_SWFLSH);
        }
-
-       wx_update_stats(wx);
 }
 
 static void ngbe_reset(struct wx *wx)
index f9cd1caaf0a449a3a80278d79750bf518e8622e1..6755464b46371522eef5b301ebc651b6b0ceccb2 100644 (file)
@@ -265,8 +265,6 @@ static void txgbe_disable_device(struct wx *wx)
 
        /* Disable the Tx DMA engine */
        wr32m(wx, WX_TDM_CTL, WX_TDM_CTL_TE, 0);
-
-       wx_update_stats(wx);
 }
 
 void txgbe_down(struct wx *wx)