From patchwork Sat Oct 23 12:19:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 12579601 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC73FC433F5 for ; Sat, 23 Oct 2021 12:19:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A946860EB1 for ; Sat, 23 Oct 2021 12:19:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbhJWMVx (ORCPT ); Sat, 23 Oct 2021 08:21:53 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:61343 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbhJWMVu (ORCPT ); Sat, 23 Oct 2021 08:21:50 -0400 Date: Sat, 23 Oct 2021 12:19:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1634991566; bh=GG4tUVfOrpHe6Cd9R03tfHXWzUXIPi4QaFA+XbWzydI=; h=Date:To:From:Cc:Reply-To:Subject:From; b=AfZZAR9wTmzyooI6hInfocai8sWVjg5SuP6fVB2J3d4FGS6gQh0FyI6XmelurR6FC t7mMGjEJiErx33eJyN5/qVWB6QB4JYhcm7eeRccDj0Gkhl6K1nOajiu+yfrM4e7Br+ j3kkWCsygrBwf5lhHpQ8voGpnLtzOS4B3j3X/vAYvZIWyHy3+b7cgx2Bu7XelC0bWn 34WLuugx08P9HJo+/sydhh6ra1W9gl4NHHuCn9H27KokxFG3DTIWw76w1Xt/omxr2r le5D4MtZm4yOPUxqQoh/K7zDvd4RKmNMGRGfPG6TAHzZASIpv+wkPH8yose6Yrg7hJ gbBPBr2VuUp9g== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: =?utf-8?q?=C5=81ukasz_Stelmach?= , Alexander Lobakin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH net-next] ax88796c: fix fetching error stats from percpu containers Message-ID: <20211023121148.113466-1-alobakin@pm.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org rx_dropped, tx_dropped, rx_frame_errors and rx_crc_errors are being wrongly fetched from the target container rather than source percpu ones. No idea if that goes from the vendor driver or was brainoed during the refactoring, but fix it either way. Fixes: a97c69ba4f30e ("net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver") Signed-off-by: Alexander Lobakin Acked-by: Ɓukasz Stelmach --- drivers/net/ethernet/asix/ax88796c_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.33.1 diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c index cfc597f72e3d..91fa0499ea6a 100644 --- a/drivers/net/ethernet/asix/ax88796c_main.c +++ b/drivers/net/ethernet/asix/ax88796c_main.c @@ -672,10 +672,10 @@ static void ax88796c_get_stats64(struct net_device *ndev, stats->tx_packets += tx_packets; stats->tx_bytes += tx_bytes; - rx_dropped += stats->rx_dropped; - tx_dropped += stats->tx_dropped; - rx_frame_errors += stats->rx_frame_errors; - rx_crc_errors += stats->rx_crc_errors; + rx_dropped += s->rx_dropped; + tx_dropped += s->tx_dropped; + rx_frame_errors += s->rx_frame_errors; + rx_crc_errors += s->rx_crc_errors; } stats->rx_dropped = rx_dropped;