Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp908115rwr; Thu, 20 Apr 2023 07:43:30 -0700 (PDT) X-Google-Smtp-Source: AKy350YfbtwnAICb+RnIchjS7RSNRhT6cut3/k7GF3F6jH9v1uIVC1yihY4yI6zoZs/FlNXjP8Ja X-Received: by 2002:a05:6a00:cd0:b0:63d:260d:f9dd with SMTP id b16-20020a056a000cd000b0063d260df9ddmr2067986pfv.33.1682001809745; Thu, 20 Apr 2023 07:43:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682001809; cv=pass; d=google.com; s=arc-20160816; b=b1KtIGqQ27zI5hk3Zui/VbjDTdM4zlXAfafAQd9obs7l75Ne1KUCRVB7bYXTX79emz 5VpPR+nqezuejt5UQgmULzdxtREMkDhSo/qFiSWuitdZYnBtu/RhakhGtdMNta/xqSXx csj3nRxCTmRKUU5gxiw5jGR7j70zVqrPJdvNwPQjXJrg/V3KSMuRbFppd+cyYa9h9wD2 rJ9L/mQXyga2ztWIYlw6Q140GDDgKcnDPMcRV8zAoKy6VhQ+lamY50lPfmHcDCcZvP4r 9qAL7KiMP7UC0OZ3hSd2mM2JgMSTxieaIq9vUrj76mS3HKmgGpCaKHNrC+uxjdtLZ50Z K4Ew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6dJeNtfiBCfRM4VGVmvqkPLiYJCJT7Mwj2iI82W4XWk=; b=WvyO76gYLOW5S8C+4/0xmjrvMD8QkCyJalS+67m0lH7jZANDEKLsiw3eEKAfHKf/FQ IJDRIcI2n2DjVW/A33kWGv/m7gWjB1dif5LCusqqbJ4LMYB36STWDpVI9M8xznlfPJKK gLhUNUM5d+SMT4VRZfTOqAjYhqvLS++A/vimwnUQEEV/rRDQ1uH1mcadDwZfix0LVsk4 dnpqApqMbLfXIwDTAtHbwbs5UStp0xJF1JL1MpsIK9QJQUXuj1O0TxyNlMmkhnXzq3mz zHisQ8x1jDZrYNSTGc1VklJqxH2wjNRfBI5vmjbrw80/n1mlh6Yyid7J6PevNkGdCRiL xTsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="C+4gc3A/"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x20-20020aa78f14000000b0063b240a2a86si1762402pfr.149.2023.04.20.07.43.10; Thu, 20 Apr 2023 07:43:29 -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; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="C+4gc3A/"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232153AbjDTOiQ (ORCPT + 99 others); Thu, 20 Apr 2023 10:38:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231801AbjDTOiO (ORCPT ); Thu, 20 Apr 2023 10:38:14 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2093.outbound.protection.outlook.com [40.107.92.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42ACF30C2; Thu, 20 Apr 2023 07:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W6grU0LxRgtDFJXbd229Z67S+/DgDnBb/flt4JTSiRkXtcflnOejxa21BXybPgSZmVd0WYgI82yaUTv2ismuW9QIuYkI6ZmarKJ6ufjBsGVj3lW9JLzrLtuf88ljpeyol+56b4hK3sH0CjJEYlA0yuLUqoeUYUHW/AEwOAeQWYi2yGu7IyPGJ5o9i2P/Xphl//vXCtIJhhMtKU91ib1M2MRhv5ppsUAzyQyvvEiukvnAB+IHYgVnvcVGhZlWrgCVP9WCwI8cEHdUeDDjOdwKPOlm8atvsieOS5KKVXIoTe2SYAJsjd1BTYs/9598zkf92jZa7G53544WhOL9WGs0KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6dJeNtfiBCfRM4VGVmvqkPLiYJCJT7Mwj2iI82W4XWk=; b=dZGI2YczBerZDJ6BEBW+NFUZQ49GwbZ9Z/N3U+G/eqWwA9bnyk6lz1RUuqrRNA5XMP4i+4QSvpggdpWJbSd0xD0zgYIGnhlMNV54drIZFnfKP1TXBTAXgUjc3sJoE6SCo6qdhvuAq8v75HGTKQXtR7aOVSOdGxcMRMG5/sQ8TnTZzUNOvdtSKQ+SCsjnDw9sa8Xdphc8EG2mhSxlupunBk/aYnbi9hVBjDhpcFhavYtS+zsW5jOoXgNN2FoX87TzgZXi2jMGc1A0fgOAScX4n6l4AUI5LXDsLiQAHR+8WGeBM3gQ8UHV+m2408ceyvVJ4FLv3KP7uJ2DMGC6hV2cvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6dJeNtfiBCfRM4VGVmvqkPLiYJCJT7Mwj2iI82W4XWk=; b=C+4gc3A/g8c/b6oc0bdabPp173vGSYBnGliA+IXt6fpau4Qpa4is4xnXexr7/oQHgnrlZj46jXREAWhp3CTdSOs6R8bHVocyfBr1faqtDxOLgrFWKC8OkcOKkdcFuKlwUsWeZjFh7aC1nanm39rEw0OVyTVpinA+hos1LLfwcZs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by MN2PR13MB3789.namprd13.prod.outlook.com (2603:10b6:208:1e4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.22; Thu, 20 Apr 2023 14:38:09 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34%4]) with mapi id 15.20.6319.022; Thu, 20 Apr 2023 14:38:08 +0000 Date: Thu, 20 Apr 2023 16:38:00 +0200 From: Simon Horman To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Michal Kubecek , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Claudiu Manoil , Xiaoliang Yang , Petr Machata , Danielle Ratson , Pranavi Somisetty , Harini Katakam , Vinicius Costa Gomes , Kurt Kanzenbach , Gerhard Engleder , Ferenc Fejes , Aaron Conole , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net-next 4/9] net: enetc: include MAC Merge / FP registers in register dump Message-ID: References: <20230418111459.811553-1-vladimir.oltean@nxp.com> <20230418111459.811553-5-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230418111459.811553-5-vladimir.oltean@nxp.com> X-ClientProxiedBy: AM4PR05CA0020.eurprd05.prod.outlook.com (2603:10a6:205::33) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|MN2PR13MB3789:EE_ X-MS-Office365-Filtering-Correlation-Id: 756f1dcb-d70e-4cfc-b1e8-08db41acdc10 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: veHVm32z+o2RMmt/aPxH/DuCf9SNod4AVg4Hvuziy0ql/p6vscScqWq390JYef9WqFWNeHh2pPnfgEhH6QT+lL9i+cVFmyRhJrqnz1egkXYjWCq/M8aZZKq4XoWMqkCHLpRVaMV/hvXXiXSgBfx+wUzKyt0VAb1kET4C6q9coKk9DrfUzIYhaImzM8pVyItnqC6PTYTc+DbP9kkYLtqq3Wh7+RVl8Ig6QcHyrCuR/MyMqQpUeGfOFEMkTlnegQuUsJGcfwty0Ckr2G9g+QkDIHW64yyca1hphpwIVjehbkZdCQImsr/+5c45SdzHoz57kSL21CGeh6RJ1wVyepF0qpGI3oIbP3xr752CvGZtmjEGWbwxZtdqyOjJIZ8dFeeOiuaFXa6gYlSDwW279SCbCeDgaeQNJoqcTf2VloIGEOW7P/P2SscQ+AO9zHRWwWdblKNGrQ9dOsU+eqmoAOmS/BVxmKcaTGv2Llu4b0zNH0V2JLkZs2sv1+8fr0PO4rYytajXjJBtHTcSVC455djq3vhWQ06F/kyvl7O5P5YhecNBs4VhiJ6LzxzxvDguxALb X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(39840400004)(396003)(136003)(346002)(376002)(451199021)(7416002)(8676002)(8936002)(186003)(86362001)(6512007)(6506007)(2906002)(2616005)(36756003)(6666004)(478600001)(54906003)(5660300002)(44832011)(66946007)(66556008)(66476007)(6916009)(4326008)(316002)(6486002)(41300700001)(38100700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?t11kXV7/KdMrHVjKOvXBltwbqW/BNU4O+Wdd3XQf3BoiNAfNOxxWmak1Ntme?= =?us-ascii?Q?cDLPgmWf4yujNIgLVnOQZlSlZK+MufRI5ZW/ntgamQS2nLvXXY4+W+6zjMbz?= =?us-ascii?Q?ffLZ1OliethHKin7GKC1GhjAqmq+SniD9l8rOJY0EyZlXueDLh2qBDMSVMvG?= =?us-ascii?Q?/Z6j8u3ERZX/c2hmHDiqVQgvySBjqFsalimRaowJmfnseT1THDIOGiCSqzTH?= =?us-ascii?Q?OwtWZi8zq8ccc03xXD3UR4r9XRF9jkXYBRtfjSC+AazFf8PIcCYzjglx7Jek?= =?us-ascii?Q?KU0pjBwXhbPUk4Sc0iGr5UlNUvyfgrC1Izcat/Z1Z4viGJPobo+F6dCAEvGw?= =?us-ascii?Q?AFbcp2eXfeORvqmpVILWy5/iOOCs4uOg+1rhS/fCmfwU4lRxGBKJJ41FdhmZ?= =?us-ascii?Q?1kZ8UHj16sJ13QUiJmYb6bEkcRaTbUhFNKvPfQXVlYE6UU2zVUd0bSajTrR6?= =?us-ascii?Q?Y1NKOGyYp2mnSZ9IhSJP+F549XhMKCuokwXC6O0KY24qU8Rrb+vrEqrntK3V?= =?us-ascii?Q?y34X2eL6+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/wkZKnPQ1v8hfU4V86YIAMwdEv+g9?= =?us-ascii?Q?4jfky6s10mrLsCS9XBYbTEFd2GwcjRs8liYtVlofLuZsQdqltqpO/5G3+Cq2?= =?us-ascii?Q?yJhhq3kNGN1/tT5cED0ZlU4AEH2Wtn4NcAJOb6H/OAPjed/t7kMQQJOBikl2?= =?us-ascii?Q?h+F37DEg1y9fq0I3WcqLFe02rN+PY7oOZYoNDDd+08NJaVgb8ifRPdpye9Ji?= =?us-ascii?Q?4ujEBUmkrGq4Pg8Bg/3h4pj1+xDGri7IcxWGUR/LGtPcaTlRNl/VZllUK5rs?= =?us-ascii?Q?Z51GLQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 756f1dcb-d70e-4cfc-b1e8-08db41acdc10 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2023 14:38:08.7500 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Cbq6VRySpuwZ5BTe8UQklRzcMtep/2HiXglczvODyCI97mydbx6ocIfmRixSzBxz/44YIPDa1s2Er2QDpfI5mQoSezG001unuLzm+owVcoY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3789 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 On Tue, Apr 18, 2023 at 02:14:54PM +0300, Vladimir Oltean wrote: > These have been useful in debugging various problems related to frame > preemption, so make them available through ethtool --register-dump for > later too. > > Signed-off-by: Vladimir Oltean Reviewed-by: Simon Horman > --- > v1->v2: patch is new > > .../ethernet/freescale/enetc/enetc_ethtool.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c > index 838a92131963..e993ed04ab57 100644 > --- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c > +++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c > @@ -32,6 +32,12 @@ static const u32 enetc_port_regs[] = { > ENETC_PM0_CMD_CFG, ENETC_PM0_MAXFRM, ENETC_PM0_IF_MODE > }; > > +static const u32 enetc_port_mm_regs[] = { > + ENETC_MMCSR, ENETC_PFPMR, ENETC_PTCFPR(0), ENETC_PTCFPR(1), > + ENETC_PTCFPR(2), ENETC_PTCFPR(3), ENETC_PTCFPR(4), ENETC_PTCFPR(5), > + ENETC_PTCFPR(6), ENETC_PTCFPR(7), > +}; > + > static int enetc_get_reglen(struct net_device *ndev) > { > struct enetc_ndev_priv *priv = netdev_priv(ndev); > @@ -45,6 +51,9 @@ static int enetc_get_reglen(struct net_device *ndev) > if (hw->port) > len += ARRAY_SIZE(enetc_port_regs); > > + if (hw->port && !!(priv->si->hw_features & ENETC_SI_F_QBU)) nit: I think you could make the condition. if (hw->port && priv->si->hw_features & ENETC_SI_F_QBU) which would be consistent with the condition in the next hunk. > + len += ARRAY_SIZE(enetc_port_mm_regs); > + > len *= sizeof(u32) * 2; /* store 2 entries per reg: addr and value */ > > return len; > @@ -90,6 +99,14 @@ static void enetc_get_regs(struct net_device *ndev, struct ethtool_regs *regs, > *buf++ = addr; > *buf++ = enetc_rd(hw, addr); > } > + > + if (priv->si->hw_features & ENETC_SI_F_QBU) { > + for (i = 0; i < ARRAY_SIZE(enetc_port_mm_regs); i++) { > + addr = ENETC_PORT_BASE + enetc_port_mm_regs[i]; > + *buf++ = addr; > + *buf++ = enetc_rd(hw, addr); > + } > + } > } > > static const struct { > -- > 2.34.1 >