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 C92E844077; Mon, 20 May 2024 12:42:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3BE03402F2; Mon, 20 May 2024 12:42:01 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2070.outbound.protection.outlook.com [40.107.220.70]) by mails.dpdk.org (Postfix) with ESMTP id EEC60402E9; Mon, 20 May 2024 12:41:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xkz17MtV3W/BKYNu2eHM1vzl6eoyVZz5M0h6NbqDh4YPuw3hr3UkUK6sL3ZMYi9ePe4WBilVxt9KTaihWV6S4W1HToqNZWcGFMF34UCGNXGkFDol+IgBORaF0olzTovlrqbdGbelDHBYzJXShDO3P681sNL+5P2VEs/L4EecThFXK0m88jdwrXiAewMzN2hxgz/yBsRI4Vy2bYXBZkz/I8757yVSglVWqnFWjPe69B+NZuhdwOWDGzC7qlqesRbMjsZtJ1ZfRH6vtdt/N74yhD/2AhdF+K1QBTlGVmvhVSVrQPxYC7u43G6GY+0LcXhY5zRMsnSHOWyZ5dEQPZH8Eg== 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=4/HtwlwDlFyjgL9K7dW6PenDdTxJPNckm4DdCMMQtQU=; b=N/So9ja+kEH5LEEMoL26hkZ5CPlzgBCY5E/MJbyQhpQwVJmKr2UN8pbNLYBlgs/CNOL3TUQGI2cuyXcXvtKWrMAcq/78WTC7svRVcpahmWPGsBD2ssLeOWDACsVSFo5zXdmZms6HZYRqoHZ2Y8MNm8gndsm1/1qZcounc4FfnEAOsjq9dKwxcjDFrfg0R9JY+nQCOMBJ/ahK0fSgYQtSb83XqPqeoKWfrSduQCrymGbErueezEooOOlL6i94wIxAoCfguXqJqoMEleN7QP4jWKXwLF8QmPLG50llhS1+AEurR3ZJt5Dz/Qg78/mXp0bFa9KZYCkYwJ3OcsbDXBM/9w== 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=4/HtwlwDlFyjgL9K7dW6PenDdTxJPNckm4DdCMMQtQU=; b=Bfl9ZH7KzeZyXyDPUoi7IBj/ltw3DNeHsDNEzRIHfvCReTN6b223PNauh10UhiNcgod+OzxCclHG9HzdEi4z7/YPQod14OSHP2HxPIZ0rPs9EDfLBo+eYgssVRFcTdTMJBRkTgAGXGe1aW2lEAGmXXCtGdRcvHjCaczDgn5rYDI= 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:58 +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:57 +0000 From: "Sebastian, Selwin" To: "Ande, Venkat Kumar" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v2 09/25] net/axgbe: fix logic around active and passive cables Thread-Topic: [PATCH v2 09/25] net/axgbe: fix logic around active and passive cables Thread-Index: AQHaoHw6rqs+/prf+kGd8h0z2FfMj7GgA7Dw Date: Mon, 20 May 2024 10:41:57 +0000 Message-ID: References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> <20240507124305.2318-9-venkatkumar.ande@amd.com> In-Reply-To: <20240507124305.2318-9-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=f4411b42-3f9c-4c80-aa84-49fa58e08fa0; 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:54Z; 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: a0a275c1-4a48-4235-730c-08dc78b97953 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?5M0xFi873LD9wbh4JLPsh0z4TQIV+2ITL0UyKjlSk3a2ebX2Zq0YuRISImj2?= =?us-ascii?Q?vNaLr7IPA4smXstd5Hubx2Rn2bRNMQ4ECSIOWmyjavVSSL4TeS1SWVJmYrd7?= =?us-ascii?Q?c01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QGByBbhxT?= =?us-ascii?Q?xK9OzlLW9MMDVDcjuCB0y0TrvRuMMbDCuPgI4ve1LvUrizavKcvN7AjcYGM9?= =?us-ascii?Q?/hQQc39ZVKDROTzAeRsdkZz04UD3Db6PpF9mTVBTh3rZ4ckI9t8AHcPH3WAt?= =?us-ascii?Q?3c5w/nkDmjuOlva22LkPlyyyj+aTpuU3zg8cMK+tR2GDnLQSBpF8R8MTROKH?= =?us-ascii?Q?HuXSYIi/xg3NKdwxDs5SnGd3EsS1gSCMH8R7mzIcy6PYFktrMhTArdQzbvB6?= =?us-ascii?Q?UA+0kXPmA0nnd32wsuYzGxcjrb4miDwjiwn/UB2SHFf5+GYcIAk8btBY/zxr?= =?us-ascii?Q?JWESU/UTG6cGRAyAKUFNyr9QxMnNd0cdPcAnkIExA8EkOQ=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?htOMCodVvWOtqBsxsqvhhXY6nAGCl3K9/NeUi3JElQOK6BU4LMpyikvSbIim?= =?us-ascii?Q?gStaS2f+O8sI3eqxdnBykTk0cMJzsieRFIZbtBHVe7D4GBS4Vko+NhioK/Gf?= =?us-ascii?Q?BIH97A64ZFDjBQI7WJ1Xcy9Sb74B3vuoNqUHUMb9xBRzP39R3sr+LqjiCyUI?= =?us-ascii?Q?rSL61bLdnB7xr/ppEPNgpQTX1TEqbxHGagQ3ltFp2K0z/yjT6QVQDHbmciXZ?= =?us-ascii?Q?VFgoHu9vXtgA8jdtnQnX7QqVRI0AuJTp2Nh32mnXpBJ+aTwVmRCmLuf/tQ9B?= =?us-ascii?Q?++zfQKQAffQBe+NX2dxMrB6DP3/16hYqga4m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gyLllaHRe0ih79J0EcskY2PP4cwXlSJkil2YlbqypG6XeLjGp9T1z?= =?us-ascii?Q?elv8pxJK5AIguKOs+1G8HFAEsTwoAreVj8j1d7RtUb9qtEh+I7ZklGr+KWda?= =?us-ascii?Q?mmg5IdSuvRYJox4rqe54JCNEmJQTxR5V/0YiM3cjc5U8WHuM4b5q104Foar+?= =?us-ascii?Q?sUJAg6/3gq8DKQnr3qzhm3rlZcOoD8STEiliE4W77l6RMecvFhImdG9XHvVN?= =?us-ascii?Q?oziHiG204ybCv+48LrqeE8bBpC4btW9q0E/5J1a8lJ6zAb/dFJCvrlnUwzBD?= =?us-ascii?Q?s2x7oVebtc4x6cuurUKD5B4pK1HoqydhmFEQDS12xpyxYEEXiddeHO1t3z7j?= =?us-ascii?Q?Dr04DRx5b+6shkzdpJDBCdrdG9Fq5rEF7di0ho1H?= 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: a0a275c1-4a48-4235-730c-08dc78b97953 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2024 10:41:57.9072 (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: ozW/85C1Xu/lucA2pU7MVIeWO/c9jGc2GAXpBZg8e+gRNkdRyv4UThXUvd9RYkKr9ZpvEUGBDkjESF1p7kIUSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7123 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 [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 09/25] net/axgbe: fix logic around active and passive ca= bles SFP+ active and passive cables are copper cables with fixed SFP+ end connectors. Due to a misinterpretation of this, SFP+ active cables could en= d up not being recognized, causing the driver to fail to establish a connec= tion. Introduce a new enum in SFP+ cable types, XGBE_SFP_CABLE_FIBER, that is the= default cable type, and handle active and passive cables when they are spe= cifically detected. 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, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_p= hy_impl.c index d4c4a89517..8b66def631 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -69,6 +69,7 @@ enum axgbe_sfp_cable { AXGBE_SFP_CABLE_UNKNOWN =3D 0, AXGBE_SFP_CABLE_ACTIVE, AXGBE_SFP_CABLE_PASSIVE, + AXGBE_SFP_CABLE_FIBER, }; enum axgbe_sfp_base { @@ -616,16 +617,18 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_p= ort *pdata) axgbe_phy_sfp_parse_quirks(pdata); - /* Assume ACTIVE cable unless told it is PASSIVE */ + /* Assume FIBER cable unless told otherwise */ if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_PASSIVE) = { phy_data->sfp_cable =3D AXGBE_SFP_CABLE_PASSIVE; phy_data->sfp_cable_len =3D sfp_base[AXGBE_SFP_BASE_CU_CABL= E_LEN]; - } else { + } else if (sfp_base[AXGBE_SFP_BASE_CABLE] & +AXGBE_SFP_BASE_CABLE_ACTIVE) { phy_data->sfp_cable =3D AXGBE_SFP_CABLE_ACTIVE; + } else { + phy_data->sfp_cable =3D AXGBE_SFP_CABLE_FIBER; } /* Determine the type of SFP */ - if (phy_data->sfp_cable =3D=3D AXGBE_SFP_CABLE_PASSIVE && + if (phy_data->sfp_cable !=3D AXGBE_SFP_CABLE_FIBER && 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_C= C_SR) -- 2.34.1