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 C403744153; Tue, 4 Jun 2024 14:13:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C9F5436CF; Tue, 4 Jun 2024 14:13:00 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2081.outbound.protection.outlook.com [40.107.236.81]) by mails.dpdk.org (Postfix) with ESMTP id 57530436C7; Tue, 4 Jun 2024 14:12:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MvEvldpMYWVX0BofzlM6yGdyxLv67MR+nX2Gtnv8DeMdP6kjcrgyJY24P8/TILyPkNAOC1qOUFlU8LkCaSPWNHH76AfmfmTS3UvRF0cIElgIZT6EXAswUGTGDzMb4hhzKprzmBFvo7Xvx+ZmAAc58upvIRJyO6g3K2XHqBUoWG2lxSmsvlq1MoPpRZZCuC7ls6ZN4okm2KceH5e3aZ1vWtqehu1dv9HyWe/fRWsBOb9wzw9f8sM6uPqKZuklQ3pXloQ+FAOBQ1BASABVfb/gYHNl7DZjQ9Fr3BGJQMxz8BznJTx+wIxZlaXpkCnMbNozm0pCXNo5Wqq8+zukzGuz4Q== 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=TzonEXenRT08o5WnjGBVtggiWW0DF8aonfjJv2rALbM=; b=BMvLLTiNIsZNnSaQlUIO66/CmlZTSoEZ3gvXHJ0ESNIhIQRxrDyXs4VZNSE+iEFFOhbUqM09M5pgE9XcHDzg/0HIcLpHuyYi86IYl0NUXnnZgh2bIddPmqWPUAnyiYeiIA7bTlJKY4W6ohaAuDxoxeNfZiJNENrI8j7AmD8wArdnAvE8tGvSwrFTd7u4y1sW1lCfR3jh6F5QoxU3860YIs3rkLjWGBgH9H1Tw2BfXyM0knXKdjQ9TFu8sdTIAU46saSLxQPI4TYFWeG+2WdtHKLkbp7wkM2KVwxxnWlhgGaaTV7NZ3RwZk1gXDaopLHVAKd7TW/TYMHZFDsoonfihA== 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=TzonEXenRT08o5WnjGBVtggiWW0DF8aonfjJv2rALbM=; b=BX0D1ycI2CLplS9vG08BFu2B9kL7SX4SIoKMAGbpRffTR/yhqsNUMxZzLHnbOodW0drZUvViy4oUyfh5pNjzS7IeOqLAPOTgVN7ffQAqlWoIdpMwE9iPQXoGhLS43F5f3WFuB8Cj7agfNlYctG6ZNqUKhKz7DeE4JkONueR6HI8= Received: from BL1PR13CA0374.namprd13.prod.outlook.com (2603:10b6:208:2c0::19) by SA1PR12MB7320.namprd12.prod.outlook.com (2603:10b6:806:2b7::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Tue, 4 Jun 2024 12:12:53 +0000 Received: from BN3PEPF0000B371.namprd21.prod.outlook.com (2603:10b6:208:2c0:cafe::a) by BL1PR13CA0374.outlook.office365.com (2603:10b6:208:2c0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.14 via Frontend Transport; Tue, 4 Jun 2024 12:12:53 +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 BN3PEPF0000B371.mail.protection.outlook.com (10.167.243.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.0 via Frontend Transport; Tue, 4 Jun 2024 12:12:53 +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, 4 Jun 2024 07:12:47 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , , Selwin Sebastian Subject: [PATCH v3 10/25] net/axgbe: check only the minimum speed for cables Date: Tue, 4 Jun 2024 17:41:42 +0530 Message-ID: <20240604121157.3052-10-venkatkumar.ande@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604121157.3052-1-venkatkumar.ande@amd.com> References: <20240507124305.2318-1-VenkatKumar.Ande@amd.com> <20240604121157.3052-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: BN3PEPF0000B371:EE_|SA1PR12MB7320:EE_ X-MS-Office365-Filtering-Correlation-Id: b2cca2c0-5d54-458f-48dd-08dc848fa954 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|376005|36860700004|82310400017; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Sivt0APAsL0USXy13P+tr4GZim2OHnqQsK/V2xB7cUSbia6MO/d/Mfl1/8zj?= =?us-ascii?Q?1736XgNMqN2/H9TNLPIm+EJY/WzIfx96SXTRBDNYYRG68xRDSmFm6IVfr1dh?= =?us-ascii?Q?9i+ok6bta0UVu+NvK7FudVpNIddMhPkAWDBA2ldEMy3TFX14z4U1JkxeKial?= =?us-ascii?Q?vwSxrUS/5ELevyJn+H41B3P0LkxTE5kK/XfKJ/DZ3NlT0gaJIexPLwo1r+Ae?= =?us-ascii?Q?inngE7wGNeIvqyAkgSSPmaywJefFnYyh53aqYAAlEzpCzb0CIkEsKVWa8qRB?= =?us-ascii?Q?cb6GqB4LHeAYL35UlLPa6Wwp42a+VIMHcrONGhhxuKmkVLWnE0yaq8zGjVKA?= =?us-ascii?Q?jgUyxIvY2KTYAcS6+fT3VTlU07Gsy2RtkMJk5w5/GRnCZj+rWMt8jWkUtOIB?= =?us-ascii?Q?n4pFvXOjVbfs1mfzNhL4b8YyJ+u/uIRL76tYVhNNSTlq8zRM3VZoGg+u9l5l?= =?us-ascii?Q?Xyhhk/7uWlBwFkZl6otsApL4RzlsQxb1PTZgJL9QXLUGbiUNCT2pBBsVDRWE?= =?us-ascii?Q?r1XxjvYFBdaeo01R5qinWAwBmN5KSwIYfS1nPz3fWPO+K6BxIFfczmO1rerA?= =?us-ascii?Q?Wl+VDktOy3kBb6fkwtrmBd6cIDtx4Tcc4vSxfKDWFEwA/Hbi8NDP0pwdnBd9?= =?us-ascii?Q?olEvre3yOQ5CEA27gNFjqfupVYtHno0vPvniHjMzQ7hF+y0berLO6xtKE7/5?= =?us-ascii?Q?1SP+iiCQU5n3ubFhg6VnTbLnhJLFSWrwKK3fFl/a+j+BG6GCJaV5RSkrt/N5?= =?us-ascii?Q?a2GQpsSlsTfPOk0UrjEi2yfJ97zGjLwYDP5UeJ7pwmBkNNb+DccecuhB6Ulv?= =?us-ascii?Q?EljmenL/gtZATVikCCbbF3rFKG3pIDv+1ywRQK/NS//IAQ04Bifi1huJhLCN?= =?us-ascii?Q?+jdtJbr5K7n1e55Q4Fjp1O5sHXn/n6ic7dOyMSAdq3Ex3wXLjJkBtAKTcw8e?= =?us-ascii?Q?aOj52SPkCbDvcLoBovs1yhUAhHu7O3WChR3v2vOqXx0MTQH8fTgPi1zskPwH?= =?us-ascii?Q?505G1DrAzCrSj0XxL8Uj6ue8HtZFr/g+bJrIqAOSUkAat5+RWHs/mwqGa9Ql?= =?us-ascii?Q?5VkZvSMnfDq2wExafwfNdzdyCHDhPfaG2kGJagJzSq6Jwwm4QKFYwRGmUxw9?= =?us-ascii?Q?5XGBpzzJCLppuIJjXdqlN3GtQe9UJJswbcm/Ll8RNZQ0B9dg/i1WlDTFNsu2?= =?us-ascii?Q?SBFtcLtEo6xqdH5NnJsvglMKCvtELdmexkbhtI+P3StGbXS1jN7tnDVLRpaG?= =?us-ascii?Q?vW2og9vSEmEr7WD7/gZBGCloefwQnTODzovlssQBnHPgiB26emauH3bUSmhU?= =?us-ascii?Q?/Re3MXYtbY5606pzNb/RhGZvmLVaApdhd7A3ed/uzBOYWizH3JGK690fqdgT?= =?us-ascii?Q?h8kvD0DG3/u8wBzRtTe+4tDIqvoJ?= 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)(376005)(36860700004)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 12:12:53.5517 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2cca2c0-5d54-458f-48dd-08dc848fa954 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: BN3PEPF0000B371.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7320 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Venkat Kumar Ande 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 Acked-by: Selwin Sebastian --- 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 d9585a7404..b6a2a084aa 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