Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5238396rdb; Wed, 13 Dec 2023 03:09:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkpnFXpR5n9E53C67W6HoqQTqneFFkYyFksJtDU0Q3ZL00a3F5LA0Dtn4Jc3pgtwJkdBaF X-Received: by 2002:a17:90a:cc5:b0:28a:3121:f0ed with SMTP id 5-20020a17090a0cc500b0028a3121f0edmr6247481pjt.37.1702465759130; Wed, 13 Dec 2023 03:09:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702465759; cv=none; d=google.com; s=arc-20160816; b=ja4tOtjFyMCsVuGnfORh9+eSOhS6MJyodyRrK2Q8AL5lknPbpML/TdxgM7MySedf4S Q4IXyr9kxA8IVowX/klrRiSwndkJ3a5xoFZlHP1mO1W4kcArovu7vO7naRn6pJnxZnKI HbnTE30kYqv2VEvMdOPqF5evpmKpO84UwQGxbZvFTEQhbg7FUusyJ4r5jseKSaPdPggt ghTjUemrSSFC6uxwhppiv0dGWUR2wtt4pCS1tTTFxyvpHY+TL0Vg86aGIzVwjVBYwCdb Us3ZB6zNRS5ei367b5E0yPJSiZa4OOpafBz3xlFjvWDIYQ1Ebc1mk79olXbyAAjv8cyU wtYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0a6LPd+Yss4Gcl40E/Ys8I+/eYbQMQZatHCGb11BOic=; fh=asmpGj2YxYe8/ji4bMUZUZytUYtbGpU9WbAkliy8rO0=; b=xQzMdWMDZaibPIdMWjlLOODt+Q8BCrbYgeXIJlIVCkrP2UYa5Xt3EYGETTvCBI4ODD SjvYGVKH/wKAtpOqVT29vUDK4/AhZpnWnEAL4zXjxWwGvtB6qCZRflwmjwl2PUFRjRre GbFv4qqARQU+9XIbkyiym/p40NMfOcuvthnTmDMskT5ksEz24MUWEEiLy6JG8Kw6C1FN wUJsZ8c7zg/MOfI/143EsZBcxImfDXlx1ziH/+vZKEQDqGfsh18elgitbjopEl4244Lu +0U+Fe5evqZRnWU6kxL7vMDgm13EC6b49ZeSIBXOazSV0pWkEuRMNgsQ0U5hqv0KiRo+ 3ngg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u1QYrjSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id z93-20020a17090a6d6600b002858a23002asi10619334pjj.20.2023.12.13.03.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 03:09:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u1QYrjSV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CD2E0805CF1B; Wed, 13 Dec 2023 03:09:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378592AbjLMLIp (ORCPT + 99 others); Wed, 13 Dec 2023 06:08:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378857AbjLMLIQ (ORCPT ); Wed, 13 Dec 2023 06:08:16 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0027A124 for ; Wed, 13 Dec 2023 03:08:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2221EC433C8; Wed, 13 Dec 2023 11:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702465692; bh=zLuO6/75uYDIjN5N3SM8Ia80Qf1C89jN/8CZR3SxV6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u1QYrjSVWVs98vp3dGJAOcfh1QmVxz2E+XOIHpC/0jUmxirlpTOhCMuE643wDu4J7 HEMgMFpFDtP23AdUMaGNUqBgtKaheprkR0PQfxKsrJlz1o6IJj8TuSqZov/64rxqPJ aOwPzWWX1kXCeLscvxaPpGjFCYqTQC2KzUuZ3ODHirnAUP2U5QyCv+D2p8RVsa44tI hI5i8lEwQ30x0p8jBFMsrVYrpNfu+VkrNwmYacfz5IT2RnwWZ3TeBf3NlfDnI3EVxz 4j73V/cgoXbntKfjzl4faw0U6yfpqG56NRylkHJZ1rJ5OkNGrCeg009YptFoSJJKTX ASKKHIwY1xsWg== From: Roger Quadros To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, vladimir.oltean@nxp.com Cc: s-vadapalli@ti.com, r-gunasekaran@ti.com, vigneshr@ti.com, srk@ti.com, horms@kernel.org, p-varis@ti.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rogerq@kernel.org Subject: [PATCH v8 net-next 11/11] net: ethernet: ti: am65-cpsw: Fix get_eth_mac_stats Date: Wed, 13 Dec 2023 13:07:21 +0200 Message-Id: <20231213110721.69154-12-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231213110721.69154-1-rogerq@kernel.org> References: <20231213110721.69154-1-rogerq@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 13 Dec 2023 03:09:17 -0800 (PST) We do not support individual stats for PMAC and EMAC so report only aggregate stats. Fixes: 67372d7a85fc ("net: ethernet: am65-cpsw: Add standard Ethernet MAC stats to ethtool") Signed-off-by: Roger Quadros --- drivers/net/ethernet/ti/am65-cpsw-ethtool.c | 3 +++ 1 file changed, 3 insertions(+) Changelog: v8: initial commit diff --git a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c index d2baffb05d55..35e318458b0c 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-ethtool.c +++ b/drivers/net/ethernet/ti/am65-cpsw-ethtool.c @@ -671,6 +671,9 @@ static void am65_cpsw_get_eth_mac_stats(struct net_device *ndev, stats = port->stat_base; + if (s->src != ETHTOOL_MAC_STATS_SRC_AGGREGATE) + return; + s->FramesTransmittedOK = readl_relaxed(&stats->tx_good_frames); s->SingleCollisionFrames = readl_relaxed(&stats->tx_single_coll_frames); s->MultipleCollisionFrames = readl_relaxed(&stats->tx_mult_coll_frames); -- 2.34.1