From patchwork Wed Jul 19 00:39:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 122345 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2119669vqt; Tue, 18 Jul 2023 18:11:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlGpk8mSD3sdOixPgx/OYHEdznNBjlfhdtYn62eCWWnBfSSXcqpB5Ifmu825mi5cTOlKF9e+ X-Received: by 2002:a17:907:3e0a:b0:993:fba5:cdf1 with SMTP id hp10-20020a1709073e0a00b00993fba5cdf1mr1409981ejc.22.1689729118245; Tue, 18 Jul 2023 18:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689729118; cv=none; d=google.com; s=arc-20160816; b=OUgdSFDKt0FF3/qla+XAezdEHdMXjWUMwnUJY2GKyZZ8v3CFoeLPUVS0R+7LR3v7Xs vTZSi+r/IBusWg+5vNZgc/LRupW/VP5x1wlKeRMVpaSDqusMcDyV3wDcQiPWUd7R/l6u ELii+N2ex3PBw0Aaf75CC41cUb4haXXorXqGpMcizE0cJf2bzgNzUat3JXU4YQ/Nr6LJ vgrajeC2kdsu+eBSbKzv+Bna3RSPBBNlg+9BmSuqXJBA7zXItaWa1RyyAgOpPnZvLPkt UQZrJuStcQkvtri4QmABOQD0tcCOGq8kua/Skz6Jd6wyFE6p33xzy30g4GQoV3qP2KHU VZOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=mHY+1oH0Tgef7BNwDp0vFm2rZ8de64Px74Z8PHY05JY=; fh=U78joW4LQQwfOIONL4n1MTnuN/QLLK4L8T4ZhPfDc0o=; b=ZegtK38wWUBca1Utf+xNRTcFD4ph/ePo4mVdKo0Dbyd/wmHq7JTan5+7ncDUeyu1gk 0zX9bA9NP7C5wGWfHe3a4DWVBi6lX4gTGUH7VRJZ9Liz75j/ulw1nKBWuuIQj4uKZgmg p40ZTrr3CfaY8By+KIsvFI2mr53kxvx/bazqAtScWmZQ6isJK2vAXgUxnn3sLnRLZ+l5 okotPMnj//1FkjC9eNVn0QCYDMVMuxRCnVBDUVlNgmaB+3qBk+jYCAvB+aCAfk7VEdTO RTIO+H84rgv8o3Yn8r5pdUl76X9qdaVH4ownw4oLzo7Xe4VxkEHWFbv5x5RtSJsoKZy9 g9AQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id se18-20020a170906ce5200b00993398bcae2si1772153ejb.122.2023.07.18.18.11.34; Tue, 18 Jul 2023 18:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbjGSAkK (ORCPT + 99 others); Tue, 18 Jul 2023 20:40:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229670AbjGSAkJ (ORCPT ); Tue, 18 Jul 2023 20:40:09 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F9D13D; Tue, 18 Jul 2023 17:40:07 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qLvEO-0002TA-0d; Wed, 19 Jul 2023 00:39:52 +0000 Date: Wed, 19 Jul 2023 01:39:36 +0100 From: Daniel Golle To: Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Sujuan Chen , Bo Jiao , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net] net: ethernet: mtk_eth_soc: always mtk_get_ib1_pkt_type Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771809399908032102 X-GMAIL-MSGID: 1771809399908032102 entries and bind debugfs files would display wrong data on NETSYS_V2 and later because instead of using mtk_get_ib1_pkt_type the driver would use MTK_FOE_IB1_PACKET_TYPE which corresponds to NETSYS_V1(.x) SoCs. Use mtk_get_ib1_pkt_type so entries and bind records display correctly. Fixes: 03a3180e5c09e ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986") Signed-off-by: Daniel Golle Acked-by: Lorenzo Bianconi --- drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c index 316fe2e70fead..1a97feca77f23 100644 --- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c @@ -98,7 +98,7 @@ mtk_ppe_debugfs_foe_show(struct seq_file *m, void *private, bool bind) acct = mtk_foe_entry_get_mib(ppe, i, NULL); - type = FIELD_GET(MTK_FOE_IB1_PACKET_TYPE, entry->ib1); + type = mtk_get_ib1_pkt_type(ppe->eth, entry->ib1); seq_printf(m, "%05x %s %7s", i, mtk_foe_entry_state_str(state), mtk_foe_pkt_type_str(type));