From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE80B43FC9 for ; Tue, 7 May 2024 14:44:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE5AA433AE; Tue, 7 May 2024 14:44:05 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2058.outbound.protection.outlook.com [40.107.236.58]) by mails.dpdk.org (Postfix) with ESMTP id EDE7B433B8; Tue, 7 May 2024 14:44:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SETuf7oX/UA1aIKyhsIHJcWC7pc4TRKkM68yJk24VaA/qQt7uhhIsLTwAS5u1+gabbm9PTci1X/aWb1FWxlLTYrSOsIa1mQ1rvSiA3LgyZuqJmxiO8Z7S+U2yezOxQI7HujZbJBjwG/0R/dspfBfV6/uYmfczHC+YgHIshehOFOKi4v5LxE19OyILZl9/qxxPaa6xsieBL7uk/ob7bO0XGL7yiJnlR7OXyS679jTasmT0JkZ5KBZR7884ygeyDBRvnbVCNZyfCOYccIrHCcdPtHuNpe+eC+HHwe6EUWRTqEzZBSR1OZ3YRHs5G/AWzHOyaFLvltnNPQv2flwhPqyZA== 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=jXh6X9aKoxbamd6APTYiRjXFpqnuzF4uHEsFtqtoF9w=; b=lhx1z2i0j+ZaqptAb6KErKhSwVjwSMAt3DsU7aMo/+XuQbbdQDuVQIU6y1G0RuzKU6j5FovPYjv7c+VRX3RDxjc/I+UiHHjGcI9PT2VLDY0+FZpoOROc+YFmf0hy+2T/b70nWuHHsY+6J080dL7oivLcYSXmwvO8gigFXd1h8dl+Qf8slylrPZVoFHHqNfcp0K+Q6CHRms6hC22qEWSmk5+ziAcDNfEy9XbMaPQPQSOiy0yU947JgiQ2Etg0voLPtkGPyRyseCMIHU0N/5NAp1UcMyq3qVTujjCSy81HZ7nMdBXrDNN1SFGBi5PBVE1aj+f4mntkHfnSivRTVcCShA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jXh6X9aKoxbamd6APTYiRjXFpqnuzF4uHEsFtqtoF9w=; b=fGsoTEaSeX5FOBfkRvkJYXrD32cAkK/KGxt+raGkWHLm7qrtdUrOEdC5C1SvaOsGP4hpZC92teA6HMygWqXTKvkJU2Zh3ZmFseWoUI+d6PEyCR7xI2WeEhgWxEmWqczSgFOq913wK0liU+UZzyLBBgulj/4fxJJYwbIEcD8NB6g= Received: from SA1P222CA0007.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::22) by PH0PR12MB5679.namprd12.prod.outlook.com (2603:10b6:510:14f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.43; Tue, 7 May 2024 12:43:58 +0000 Received: from SN1PEPF00036F40.namprd05.prod.outlook.com (2603:10b6:806:22c:cafe::f1) by SA1P222CA0007.outlook.office365.com (2603:10b6:806:22c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.40 via Frontend Transport; Tue, 7 May 2024 12:43:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF00036F40.mail.protection.outlook.com (10.167.248.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Tue, 7 May 2024 12:43:58 +0000 Received: from cae-Lilac-RMB.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 7 May 2024 07:43:56 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , Subject: [PATCH v2 10/25] net/axgbe: check only the minimum speed for cables Date: Tue, 7 May 2024 18:12:50 +0530 Message-ID: <20240507124305.2318-10-venkatkumar.ande@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240507124305.2318-1-venkatkumar.ande@amd.com> References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00036F40:EE_|PH0PR12MB5679:EE_ X-MS-Office365-Filtering-Correlation-Id: c51900fd-db48-4952-dd8e-08dc6e935d4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|82310400017|376005|36860700004; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?e2JdK4wDdjQ+849AM+Up6dXJg0axya0JOL70nUPMXeJRXWoV1obh3Msmhqjy?= =?us-ascii?Q?9F7Hx6DoDGXYvJQgSgwIQfIWjuj8HzNQPqGCD8tm84I9n+3nsLtbKzRGXL9L?= =?us-ascii?Q?1zs5aLGy3gG0/VAYHz5BVyKLABXQwQmpIg3joNxsKgEefUItuotutUZdziJd?= =?us-ascii?Q?jVGMyxU+Nkj6s6we8zLjfqFND5ueZF9Shnq4BEBv/5U5G2ePIzXxl6Ukgdhw?= =?us-ascii?Q?jiJcafKBsKVdABxk71qPSPBmoWcuVVJ7Jv7UIJOlOgGoTWtlHLMwLq7vv906?= =?us-ascii?Q?jQxQYx+eWIEvL41bofpvlQwgU8+xvF8OUeH4bUuroc0rwvVebnjxKM7/V+VO?= =?us-ascii?Q?yRLq8xFdMeDgkvfRYbE+JundWDTsfU6EGbn7T86kishCCQcqSWEYHJEv6ZIp?= =?us-ascii?Q?LEMiww34Jxwr6nZYuC5FTpPrxvQWTVWX8Nh2pheA24tt3UrnYfoyhmDXImBL?= =?us-ascii?Q?7T4KV3e0lTPJ0z9HWQoGSC1r6XWTXv5y4zTMP7fHQ9RbrcQBLdgQx5c1jq8V?= =?us-ascii?Q?5q7CN19IluEuokaNUGGWP5EzUmJ5TjBFf/ZiVrtgcX+qie8Dr2DLcQxjn2lq?= =?us-ascii?Q?7sTjF9gkSpo5VxS65NgcncjXN1YCb7OlHPXRe0CuE3wX7sTAlTvkno86scpR?= =?us-ascii?Q?15PQJFYIesIdH/Vy+kEFFEKy+oTgF2TjNX521HWLATcc4yzaYR4VsPfhQFnJ?= =?us-ascii?Q?sHkWhfP4cx/Lf/QdGNkv0xfv/6NE9HHBFByjNfBSCzPbm3k4sMvuy4U4gLk2?= =?us-ascii?Q?TGQWngVTjWOXYbemCwCO4NZTJs2sfuZSuK3eKUloGInrPaTH7pZetfy/hlBQ?= =?us-ascii?Q?7fEZy8Ex6KCPDy1pT/RR+Gto4RSPVD770Pm2oswek/FH/pHjGvHNTF0eFMim?= =?us-ascii?Q?ftVFTpqKinAQoXO02LnBGpaNMHB2yKl00iZ+eyw74DymGRX1K2zMHQvzLiVD?= =?us-ascii?Q?D2DmDX7dLRnOjP3w/c7lglWyKh3lMAhLAeROjVwBGLeaNAIjrJ5oOdB5NSaV?= =?us-ascii?Q?85hIY8bj3Icj1xWnmWma3yf6NKIZt5S+aMn7X3h0WCwlVNv4zk9XIysL0JFU?= =?us-ascii?Q?wCWYuL+Fnxjhv9sAKr2IXu2ejr0yKUv+xo8bGz4yY0TXNs0WLRQI8HyVeeEE?= =?us-ascii?Q?+mWZBEVFiSCvUZMk1N56LOY/sCy7OveQ45a0bjt8jtf3VdGKS4QcMwibVlI8?= =?us-ascii?Q?t/eNppPiBgNbVA52o3lwR6SBjjX2au9I2o/z4QKGX3xBVHhwMSH+iChK4ie3?= =?us-ascii?Q?fyBJSrxrEjv7cnDAIoIccgbEI7VX+ongqIpd10GjZwh9A3CQ5UmMVn3o9map?= =?us-ascii?Q?ADPPacVIY2KvWRsWh71RFlwfl3yklu7Ec5onS0gd0NaffsrTiSi2tdstsRmB?= =?us-ascii?Q?fWn8OaWRqPWJaf/wbNPX6+E+zVap?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(1800799015)(82310400017)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 12:43:58.3774 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c51900fd-db48-4952-dd8e-08dc6e935d4d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00036F40.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5679 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org There are cables that exist that can support speeds in excess of 10GbE. The driver, however, restricts the EEPROM advertised nominal bitrate to a specific range, which can prevent usage of cables that can support, for example, up to 25GbE. Rather than checking that an active or passive cable supports a specific range, only check for a minimum supported speed. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: stable@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index 8b66def631..0ad5b4ba85 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -117,9 +117,7 @@ enum axgbe_sfp_speed { #define AXGBE_SFP_BASE_BR 12 #define AXGBE_SFP_BASE_BR_1GBE_MIN 0x0a -#define AXGBE_SFP_BASE_BR_1GBE_MAX 0x0d #define AXGBE_SFP_BASE_BR_10GBE_MIN 0x64 -#define AXGBE_SFP_BASE_BR_10GBE_MAX 0x68 #define AXGBE_SFP_BASE_CU_CABLE_LEN 18 @@ -536,25 +534,22 @@ static void axgbe_phy_sfp_phy_settings(struct axgbe_port *pdata) static bool axgbe_phy_sfp_bit_rate(struct axgbe_sfp_eeprom *sfp_eeprom, enum axgbe_sfp_speed sfp_speed) { - u8 *sfp_base, min, max; + u8 *sfp_base, min; sfp_base = sfp_eeprom->base; switch (sfp_speed) { case AXGBE_SFP_SPEED_1000: min = AXGBE_SFP_BASE_BR_1GBE_MIN; - max = AXGBE_SFP_BASE_BR_1GBE_MAX; break; case AXGBE_SFP_SPEED_10000: min = AXGBE_SFP_BASE_BR_10GBE_MIN; - max = AXGBE_SFP_BASE_BR_10GBE_MAX; break; default: return false; } - return ((sfp_base[AXGBE_SFP_BASE_BR] >= min) && - (sfp_base[AXGBE_SFP_BASE_BR] <= max)); + return sfp_base[AXGBE_SFP_BASE_BR] >= min; } static void axgbe_phy_sfp_external_phy(struct axgbe_port *pdata) -- 2.34.1