From patchwork Wed Mar 27 18:25:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Thompson X-Patchwork-Id: 1916967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V4Zqd5QZfz1yWv for ; Thu, 28 Mar 2024 05:26:05 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rpXyB-0001Gn-AC; Wed, 27 Mar 2024 18:25:51 +0000 Received: from mail-dm6nam10on2043.outbound.protection.outlook.com ([40.107.93.43] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rpXy7-0001GS-2E for kernel-team@lists.ubuntu.com; Wed, 27 Mar 2024 18:25:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gT3QBVyyqnTVZxLZVpyII4F0PeSu3BWDwp1j0nbbRNLsJRC3wUt8iJfkc2zteIiJGOwbc0oCW1qfUgIzAy4zitbLL6Bt8JKR15Nph/12U+XXY2vavf3YuKsf0c8GHa1CJn3XO6KWvfmMVrCg6CPg8gtfq40Z2sbOEoCNFjk2ybMxNQwcza8gwggq9rAm8Xb4NAzm+JooCzzSTSfotzGeTRRf3d4hMNBNZtfN9qP6PZCegIvv9M+0EjGS+/gJHC10PcNVFTLUb7Wj/bEM3xW9KjXJeNrqrooRlWrN6H8SEI0aYH5SLoa556aMfltbNsENHDN49vwWSkPVtmq0qzRQnA== 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=QYwJUKT048aA3V9omYgbiRG6vc64Oh6gN/fjplKxYGE=; b=oCAkvOxykrfu+zgUlkP39YdBpkgs5E6kgAkgfJE/D/iknIrJwANXmOgv/ix+Bg6PGv8F4jAeNQ+gwNS+dV+IZGA1Sa80wZlDCZtM1tg+1n1uXucw+40g4Vgu0K5Hm4W4ajfWYyya3zcO71t1vbeibWxhckpcAJRywGbw8QWrCqJwteLLtqATZf7WrkvSjaXdlGm6szJoKXK52AgoersthsGq2pPADVOTxDPT0T7tohIaaewZiuPQ5V4vcmm5d3jhvLsJoJ8iVH2UmDY/OWylECvRdVF/lkcuFK4/GX2qGV2ocxdSRdUTVhGg9CUBpva3j8PBhMRHeS54WRDscxgNSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from CH2PR17CA0012.namprd17.prod.outlook.com (2603:10b6:610:53::22) by PH7PR12MB6833.namprd12.prod.outlook.com (2603:10b6:510:1af::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Wed, 27 Mar 2024 18:25:42 +0000 Received: from DS3PEPF000099E1.namprd04.prod.outlook.com (2603:10b6:610:53:cafe::72) by CH2PR17CA0012.outlook.office365.com (2603:10b6:610:53::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.13 via Frontend Transport; Wed, 27 Mar 2024 18:25:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS3PEPF000099E1.mail.protection.outlook.com (10.167.17.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.10 via Frontend Transport; Wed, 27 Mar 2024 18:25:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 27 Mar 2024 11:25:24 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Wed, 27 Mar 2024 11:25:23 -0700 Received: from vdi.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Wed, 27 Mar 2024 11:25:23 -0700 From: David Thompson To: Subject: [SRU][J:linux-bluefield][PATCH v1 1/2] Revert "UBUNTU: SAUCE: mlxbf_gige: add support to display pause frame counters" Date: Wed, 27 Mar 2024 14:25:16 -0400 Message-ID: X-Mailer: git-send-email 2.30.1 In-Reply-To: References: MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099E1:EE_|PH7PR12MB6833:EE_ X-MS-Office365-Filtering-Correlation-Id: a8cc3228-916f-4d42-10da-08dc4e8b4f5c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: StrZmq7QhPGugXCIdM1rXHUQcNMGjVTRhwu9SxFd6Jqvd84DRlq7bXo4WkmHy/eTAYF73lHeItPVoPi4GpQ80dYYwR8NNuv4NpljDE2T89setlFrAmKScDMLA3fec5Q0T7RueRTzY+rLG9n6Ns3JI2B6mse4iFGFOOafwywk5taWZcJku1dnDLKv4rWa8Uu5FqGwOzThwxusSBSZCM+QGFCqWVhiEoizxRDhkhLKUfEP2jc30QJ12p121s3Q5BaXQwHMZe5rSstyS1OCZNazVBUWtR6DQAIgvWYQ17rTFZMRbgCMgh/RrhXho7C8qpCigXyXgueuqDAOtNZOEH2Ye/3bxy2a3Ier+lVT4X7zB74DiSovkGOnSmved5/Pmku2B3VFGdyEEg1DL+5M7vSReRGZMR3sadQY0W8bqk+bZcU8FRDRjXw0CqUkmAA8TD30a++rGkduwekTtZBX9nMyqffn6e5ekDfJHNgz1Pb7t2PNhxPUNjF1S3oim4lrrHWvCMBrwVg4JryICtHhT+YaOv+dkkif607qJfUjT0A4UiyTSQR8iYIVku6J4UqU6+/XJxdbQwu72K+tl6KcxD+6NsyeWYfeatAexVOQt6NdEU1byG6HgSnU8KdAN3fUwzbUQ9Y9NK6DwQzQBKZbXbee7uwFr+VbNnKYZevnUMt3xFqKja93e/RbKxqtnaSYP8n+z1MHI5bbNBTwrzlIFPzr0H/3EvBUnleKgucX+2YhuudMc84cn5dppUF3rY3Bh7oZ X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(1800799015)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2024 18:25:41.7059 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8cc3228-916f-4d42-10da-08dc4e8b4f5c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099E1.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6833 Received-SPF: softfail client-ip=40.107.93.43; envelope-from=davthompson@nvidia.com; helo=NAM10-DM6-obe.outbound.protection.outlook.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: asmaa@nvidia.com, David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2059279 This reverts commit a99b0d90722687edb659200ca31cf3ea4ec4061f. Signed-off-by: David Thompson --- .../mellanox/mlxbf_gige/mlxbf_gige_ethtool.c | 39 ------------------- .../mellanox/mlxbf_gige/mlxbf_gige_regs.h | 22 ----------- 2 files changed, 61 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c index c2a376db6ad1..602537f62098 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_ethtool.c @@ -158,44 +158,6 @@ static void mlxbf_gige_get_pauseparam(struct net_device *netdev, pause->tx_pause = 1; } -static bool mlxbf_gige_llu_counters_enabled(struct mlxbf_gige *priv) -{ - u32 data; - - if (priv->hw_version == MLXBF_GIGE_VERSION_BF2) { - data = readl(priv->llu_base + MLXBF_GIGE_BF2_LLU_GENERAL_CONFIG); - if (data & MLXBF_GIGE_BF2_LLU_COUNTERS_EN) - return true; - } else { - data = readl(priv->llu_base + MLXBF_GIGE_BF3_LLU_GENERAL_CONFIG); - if (data & MLXBF_GIGE_BF3_LLU_COUNTERS_EN) - return true; - } - - return false; -} - -static void mlxbf_gige_get_pause_stats(struct net_device *netdev, - struct ethtool_pause_stats *pause_stats) -{ - struct mlxbf_gige *priv = netdev_priv(netdev); - u64 dataLo, dataHi; - - /* Read LLU counters only if they are enabled */ - if (mlxbf_gige_llu_counters_enabled(priv)) { - dataLo = readl(priv->llu_base + MLXBF_GIGE_TX_PAUSE_CNT_LO); - dataHi = readl(priv->llu_base + MLXBF_GIGE_TX_PAUSE_CNT_HI); - pause_stats->tx_pause_frames = (dataHi << 32) | dataLo; - - dataLo = readl(priv->llu_base + MLXBF_GIGE_RX_PAUSE_CNT_LO); - dataHi = readl(priv->llu_base + MLXBF_GIGE_RX_PAUSE_CNT_HI); - pause_stats->rx_pause_frames = (dataHi << 32) | dataLo; - } else { - pause_stats->tx_pause_frames = 0; - pause_stats->rx_pause_frames = 0; - } -} - const struct ethtool_ops mlxbf_gige_ethtool_ops = { .get_link = ethtool_op_get_link, .get_ringparam = mlxbf_gige_get_ringparam, @@ -207,7 +169,6 @@ const struct ethtool_ops mlxbf_gige_ethtool_ops = { .get_ethtool_stats = mlxbf_gige_get_ethtool_stats, .nway_reset = phy_ethtool_nway_reset, .get_pauseparam = mlxbf_gige_get_pauseparam, - .get_pause_stats = mlxbf_gige_get_pause_stats, .get_link_ksettings = phy_ethtool_get_link_ksettings, .set_link_ksettings = phy_ethtool_set_link_ksettings, }; diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h index 9702b5be3c85..cd0973229c9b 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_regs.h @@ -99,26 +99,4 @@ #define MLXBF_GIGE_100M_IPG_SIZE 119 #define MLXBF_GIGE_10M_IPG_SIZE 1199 -/* Offsets into OOB LLU block for pause frame counters */ -#define MLXBF_GIGE_BF2_TX_PAUSE_CNT_HI 0x33d8 -#define MLXBF_GIGE_BF2_TX_PAUSE_CNT_LO 0x33dc -#define MLXBF_GIGE_BF2_RX_PAUSE_CNT_HI 0x3210 -#define MLXBF_GIGE_BF2_RX_PAUSE_CNT_LO 0x3214 - -#define MLXBF_GIGE_BF3_TX_PAUSE_CNT_HI 0x3a88 -#define MLXBF_GIGE_BF3_TX_PAUSE_CNT_LO 0x3a8c -#define MLXBF_GIGE_BF3_RX_PAUSE_CNT_HI 0x38c0 -#define MLXBF_GIGE_BF3_RX_PAUSE_CNT_LO 0x38c4 - -#define MLXBF_GIGE_TX_PAUSE_CNT_HI ((priv->hw_version == MLXBF_GIGE_VERSION_BF2) ? MLXBF_GIGE_BF2_TX_PAUSE_CNT_HI : MLXBF_GIGE_BF3_TX_PAUSE_CNT_HI) -#define MLXBF_GIGE_TX_PAUSE_CNT_LO ((priv->hw_version == MLXBF_GIGE_VERSION_BF2) ? MLXBF_GIGE_BF2_TX_PAUSE_CNT_LO : MLXBF_GIGE_BF3_TX_PAUSE_CNT_LO) -#define MLXBF_GIGE_RX_PAUSE_CNT_HI ((priv->hw_version == MLXBF_GIGE_VERSION_BF2) ? MLXBF_GIGE_BF2_RX_PAUSE_CNT_HI : MLXBF_GIGE_BF3_RX_PAUSE_CNT_HI) -#define MLXBF_GIGE_RX_PAUSE_CNT_LO ((priv->hw_version == MLXBF_GIGE_VERSION_BF2) ? MLXBF_GIGE_BF2_RX_PAUSE_CNT_LO : MLXBF_GIGE_BF3_RX_PAUSE_CNT_LO) - -#define MLXBF_GIGE_BF2_LLU_GENERAL_CONFIG 0x2110 -#define MLXBF_GIGE_BF3_LLU_GENERAL_CONFIG 0x2030 - -#define MLXBF_GIGE_BF2_LLU_COUNTERS_EN BIT(0) -#define MLXBF_GIGE_BF3_LLU_COUNTERS_EN BIT(4) - #endif /* !defined(__MLXBF_GIGE_REGS_H__) */