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 22CE044077 for ; Mon, 20 May 2024 12:41:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BAEA406BA; Mon, 20 May 2024 12:41:54 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2079.outbound.protection.outlook.com [40.107.94.79]) by mails.dpdk.org (Postfix) with ESMTP id 14544409FA; Mon, 20 May 2024 12:41:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OP6b5o/n+0EorHJMY4YtJesQCHDI3ckuj4ajzf0Ra1AwGvuV2oGQKhvBiSX47o+nNRCGiM/jzBl7/3jL6uEzxq1QTQOISLSWVkpMB/kf09rOKfwAgZShN3iWR09q7VmxWJ5F3t0DQFPhzLn5i7IzSlN63SCV3icni0P3EppCWzXHkGMlQEjrsKbDOv2NSOxGMkW6OzE708JEtO18mT6eUKp3gOhCGyL9LcVRUdh725CNBIg7dudXFkToskj16FE17PeB9vor+ltvOlNCPmSRsyGZA16e9OVjvw5ZwwVEAD7dymK6OxSwI+ky6hwTB9W0CANPWnRTTU1+drwP//QGrg== 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=HXNlyOzTvivcIdjMoJplRG/5Fa71ZFRoT/1HqsF9yjw=; b=XZh2UOc4TX+h1PhI79mffcP8vUmybPWDm8/NAvBTibldC4fLO84/nMq4+KcMqbLZnccynukVAG4SHiGa4WtiJWkTY/NEnCdf9Ck5+HJOfXAJVEGP/Mo/qD3Y1AzWyDrY6fC06Nf0mQsg646IqptlXs9C/mhkpj1BKz9ew8DBUS49datDLpdjvvm+PGO5I1MtT95fjFuPMc119cttaUCexx/yuwS7nIn11Bz5SIdgJmQBgEcac3NOZ8ana1pdSCJsrWw6iTxBtpSNBIEOSigmFkN5hwg45Eo1r85k7mGLoFpED9lwwoDKzWVwRCHHBlDgApBLkbUYv83Zk6G1mBRWlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=HXNlyOzTvivcIdjMoJplRG/5Fa71ZFRoT/1HqsF9yjw=; b=F16njA3MYM4n+P2mHbDX8vxGfDe36n2Qm6GRXUtrRVhdEP4npPN/Nwm/p7Nt2JUi/tKESesvYiJgy1rW02yt2AMXZs1RAMHqoyM+G3QcWipXAWWod/L2TBXGXRZtcTGFpvoC3kb7VbcVN4sl4ZreWS80DIOcrYjCulOTlu4n2xI= Received: from DM4PR12MB5055.namprd12.prod.outlook.com (2603:10b6:5:39a::20) by CY8PR12MB7123.namprd12.prod.outlook.com (2603:10b6:930:60::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.35; Mon, 20 May 2024 10:41:51 +0000 Received: from DM4PR12MB5055.namprd12.prod.outlook.com ([fe80::acbd:ea93:4496:51a5]) by DM4PR12MB5055.namprd12.prod.outlook.com ([fe80::acbd:ea93:4496:51a5%7]) with mapi id 15.20.7587.035; Mon, 20 May 2024 10:41:51 +0000 From: "Sebastian, Selwin" To: "Ande, Venkat Kumar" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v2 08/25] net/axgbe: fix the SFP codes check for DAC cables Thread-Topic: [PATCH v2 08/25] net/axgbe: fix the SFP codes check for DAC cables Thread-Index: AQHaoHw4pd4ni4pi90a9ddMZIMTPN7GgA6hA Date: Mon, 20 May 2024 10:41:51 +0000 Message-ID: References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> <20240507124305.2318-8-venkatkumar.ande@amd.com> In-Reply-To: <20240507124305.2318-8-venkatkumar.ande@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ActionId=89087b26-fe7e-4d43-bc03-8323b2b9ffd9; MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ContentBits=0; MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Enabled=true; MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Method=Standard; MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Name=AMD Internal Distribution Only; MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SetDate=2024-05-20T10:41:46Z; MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR12MB5055:EE_|CY8PR12MB7123:EE_ x-ms-office365-filtering-correlation-id: e9e3cd96-16b5-4039-6b01-08dc78b9753a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|1800799015|366007|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?hJi/X7cZaI/O38xTx2tD9szmYswRUEyMdTESOH1SJ+36pFBFwvQESBGgOG0F?= =?us-ascii?Q?H0a6gaV7mzKmfJ0HOvydEZJSNX9kiYYjnzeGTwmeS6aLvL2WoAVeIGmW7MPk?= =?us-ascii?Q?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G9uNB5iJYXVYqr?= =?us-ascii?Q?pPc0ph28+HZs8OouobDCTdavuRFjOPVtlyl/gRR2RzDT1MQARoiwoPW9ZPSv?= =?us-ascii?Q?WU/fChv3jHOkVxvSVM74896h2g4NXPfFrWbKvdxBmLB2Bim7U4duoBTqHbrl?= =?us-ascii?Q?xlGNzQ+18aQcAYRCqiiQv9D16N7SPgSf3gNEnaGwUD0Sbpy0QUNBDwTAlKU5?= =?us-ascii?Q?t75MxbUoE95Ru26VTvAmLLKFZhQ8Ji6jKEKBt7PzUrlDNVkwuZbmYUMmEXgz?= =?us-ascii?Q?3WcDQOOiaUgYr2oWu7Ruv5r4Va0aDQFSYjA0PNjKFsuLFYxu2Mv7m4n8a7Ug?= =?us-ascii?Q?CJJxFSZvCWUJ908g701j+awZeyWAiCmL8I8m+3P5kNkfPg=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5055.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5B6++e3vb68JTbgYti9KPRe68VPMtA5muZtxu4NDPOrPcn8hiBeU2I7Br/nR?= =?us-ascii?Q?dRbc3HycOiKaxUEwbm14NDEi0HjiB34D6MqGcajX7hHey6qSxrMNVoAuJBcA?= =?us-ascii?Q?p+489ZHJ+7hEmgbRAUJj1XIQ1GIIbtMHWk6/Czd8HlQ3BYOjx/WDIBRPHMZN?= =?us-ascii?Q?hWTb8/WB5PbYFFsYo0C94JwtFKzxPrufKcRvXyNi4+ld6z2/3MP92vnBBY6+?= =?us-ascii?Q?Fv4RCcuvdq5fqB/gUKadk3R5fDQL7oUw5thqMKGdaUxFXWLdxXeMnv9DE1wB?= =?us-ascii?Q?HMJLVj70kRC+NNYeD7eLq+WHxL/0sH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EXkkzmgobBlGxX9KHBMuCfcz6XwXEat+5ilCE+QXBKfu6z8r46wK9f?= =?us-ascii?Q?zB5WD/o+e1eNeEvlJs2GOVXmGjka0CNkFqB7cToMT+9c4WVJRygIpV9hl/IB?= =?us-ascii?Q?a3ofSZXab5b0l1RRzBIsDfXwjaOmawwEWZs/aLmVLEvogc5NqlnH06SpN1aO?= =?us-ascii?Q?dBs8FtEe3nTvn9KwXXw0hw+QdezZD4K0GKmddWbgOsbyIZ1x/+kM5TCRpgER?= =?us-ascii?Q?99rxmQI0ucoZp9wmYHh7vfn++WYBKlz4/LRlOK1giDEBQXkDQHFA0G/LjrLa?= =?us-ascii?Q?ztVaMZcPf+6rgCgNAr19NPK8Xj6StqKZgruAkgFGKKW2GGP/cZU/KHX4MkYZ?= =?us-ascii?Q?oJWCpO6/H3S2NDK4TGsuLFZVvMbB50uy+bM+mHjr?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5055.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9e3cd96-16b5-4039-6b01-08dc78b9753a X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2024 10:41:51.0516 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: v+skBAOWbK3PdX+4Gr5Q5f1Cmd+oFqb7X8OdA18uZHy64hj7xE0COINcvzeHRcoEsTSVJIAOCPhF9zANyol3DA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7123 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 [AMD Official Use Only - AMD Internal Distribution Only] Acked-by: Selwin Sebastian -----Original Message----- From: Ande, Venkat Kumar Sent: Tuesday, May 7, 2024 6:13 PM To: dev@dpdk.org Cc: Sebastian, Selwin ; Ande, Venkat Kumar ; stable@dpdk.org Subject: [PATCH v2 08/25] net/axgbe: fix the SFP codes check for DAC cables The current AXGBE code assumes that offset 6 of EEPROM SFP DAC (passive) ca= bles is NULL. However, some cables (the 5 meter and 7 meter Molex passive c= ables) have non-zero data at offset 6. Fix the logic by moving the passive = cable check above the active checks, so as not to be improperly identified = as an active cable. This will fix the issue for any passive cable that adve= rtises 1000Base-CX in offset 6. Without the fix the user will not get link UP for few DAC cables. 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_p= hy_impl.c index 9c2ae7bba0..d4c4a89517 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -625,7 +625,10 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_po= rt *pdata) } /* Determine the type of SFP */ - if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_CC_SR) + if (phy_data->sfp_cable =3D=3D AXGBE_SFP_CABLE_PASSIVE && + axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000)) + phy_data->sfp_base =3D AXGBE_SFP_BASE_10000_CR; + else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & +AXGBE_SFP_BASE_10GBE_CC_SR) phy_data->sfp_base =3D AXGBE_SFP_BASE_10000_SR; else if (sfp_base[AXGBE_SFP_BASE_10GBE_CC] & AXGBE_SFP_BASE_10GBE_C= C_LR) phy_data->sfp_base =3D AXGBE_SFP_BASE_10000_LR; @@ -642,9 += 645,6 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_port *pdata) phy_data->sfp_base =3D AXGBE_SFP_BASE_1000_CX; else if (sfp_base[AXGBE_SFP_BASE_1GBE_CC] & AXGBE_SFP_BASE_1GBE_CC_= T) phy_data->sfp_base =3D AXGBE_SFP_BASE_1000_T; - else if ((phy_data->sfp_cable =3D=3D AXGBE_SFP_CABLE_PASSIVE) && - axgbe_phy_sfp_bit_rate(sfp_eeprom, AXGBE_SFP_SPEED_10000)) - phy_data->sfp_base =3D AXGBE_SFP_BASE_10000_CR; switch (phy_data->sfp_base) { case AXGBE_SFP_BASE_1000_T: -- 2.34.1