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 8B89B44077 for ; Mon, 20 May 2024 12:43:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F8E940E36; Mon, 20 May 2024 12:43:27 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2082.outbound.protection.outlook.com [40.107.94.82]) by mails.dpdk.org (Postfix) with ESMTP id 2AE1840A75; Mon, 20 May 2024 12:43:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D23hIgHwluSbnygyQQLzsl1ZVTj1lg5WXlvl8y7Ld7Wd+7fbq8hHmQJbs3+5DlVFRuc/ceNqRwbJ7I0SNf2lCLcLBWQ2GFDk75BrSoTDYDUP4UG6el/mvkAyV+Pojws/8AmWz+XyFQrwgRKHyb3OplLguiXvBpF85RTF3PG832vhwnbcphtffTgRRWSlStNQcwe7vRHeKAdZyVIAYa+IqblmxEpX7Xi8zchvI89MTdxKsj5EVjeDezUkSwTuRUCc9AOGLYkwRbqYMzVC9d3gZMp1glMoIqV0OSnoE3EIarNJXGKr2vVMCCwOIhifrnhk++wTW3QybFLGq+kIbpXyPg== 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=Nm2ofK5mMkE3xgzpm8RfFej35xgUAxN8ZOrpk2HnCjk=; b=IQtDZIuTIA9rZ2pCsixkDYE8yhPsb/86yBx4px/R4hdjQZc4kjlCsbCEBqJ+pVHK18isrKDfhhndQcoRy6Phmhvox5HbAcTOQd5/+3R8/RazXnHxFlVq/TTRTtlch9iYx4AmD7GKV6OVxu9Hg4z9bMjiBKdFL8a/D7A+HnUmVB3r7995MDEEGVjWEJAvJmQFSvj6fxKCgfS70Jx6ZUo3fC1dY8C1TymzyPiZRM2ZJU1lX1j0X70TmQjYSWjDoT30xxSsC3fUyldkjEgwfuJ9FvItAD70CxR3MYjW6hZGp0zgPVqiftBZb3UFFtonxX7rF8n3VmcD04QDwX+o0zKrxg== 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=Nm2ofK5mMkE3xgzpm8RfFej35xgUAxN8ZOrpk2HnCjk=; b=KJ1khjMRSwhUuTqIMxhacze4GdksL+/o9ypn+4dnZAWu/3pbmF9B9NLaElYUL/sNsoCJNc69RPEUYetnzc3QgRHnrl5Iiy1Av0aHAlp12GwUMGvbBK7eVBBlFynwvmagQ65wYex4r7jJ1PBh9ZPle8rALjx3bOJKp3eWW/N71MU= Received: from DM4PR12MB5055.namprd12.prod.outlook.com (2603:10b6:5:39a::20) by DS0PR12MB7607.namprd12.prod.outlook.com (2603:10b6:8:13f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.36; Mon, 20 May 2024 10:43:23 +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:43:23 +0000 From: "Sebastian, Selwin" To: "Ande, Venkat Kumar" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v2 23/25] net/axgbe: fix the false linkup in axgbe PHY status Thread-Topic: [PATCH v2 23/25] net/axgbe: fix the false linkup in axgbe PHY status Thread-Index: AQHaoHxQEqqH5cjn90+JRdb/kHoDG7GgBBbw Date: Mon, 20 May 2024 10:43:23 +0000 Message-ID: References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> <20240507124305.2318-23-venkatkumar.ande@amd.com> In-Reply-To: <20240507124305.2318-23-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=669a1199-3bcf-4d7a-bb92-cb60ef497523; 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:43:19Z; 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_|DS0PR12MB7607:EE_ x-ms-office365-filtering-correlation-id: 2ba246ea-2665-451d-ba10-08dc78b9ac42 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|376005|366007|1800799015|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?9zha6fwOV/IsK+A+ia3/Blz9Rr5S8lm+5rKNpdiaFzqEuaG999I3lcts6rn7?= =?us-ascii?Q?hsdIIbcKGLMpTANBvLNa26xEBWMZuBWNU4B/Poy7jUy1sSUg6GdqgF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Iq9lelJXWAmChLVHEqnZkB/la8aRiLAN2DO?= =?us-ascii?Q?5DA+n7JQO7IMTlE2+EC4C7Xi4Kz4rcbEunw0zGDqhCmuMQaRoHcrBv9Grk7F?= =?us-ascii?Q?noG4nMAWkN+CYa4F2E5/rIwCWNtUZZ8LkzsnddKUQIG8d0XseNkuKy1y1i/r?= =?us-ascii?Q?E5SssJvclSfQysUQOwguSHCvxcHxiB2/LPFQUZCCV/5xnLA6k1sxIXd6jHC9?= =?us-ascii?Q?J3Focs882vTLqjhURBUTH6Jhe+XFdZdMVzkeAckMdodEyXdIePbAohFEofm3?= =?us-ascii?Q?OmJ+tpsssevMQSrMfXjVwr09sUIyCObRoOzTaZq+jwV0n0ofM0T6thooaiE4?= =?us-ascii?Q?K5dUBQ7yFEmvzbrWk/vztNDVMqoS5ifekciEM7qTbQn8uQ=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)(376005)(366007)(1800799015)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?hgzBsJFMNhk2isvKjfd4rHXpWs3xor51ea24ZydbL7gxXQC6PfCpIAeuiKOH?= =?us-ascii?Q?1GtbgE8F2efVnGvbSCbEOYdlsyx0dyxCVqB4tOQ9Ju4zuXqZu7EZr0BFxKUy?= =?us-ascii?Q?co1a6EZKhkqFtNvGPZ9OoGOzU0/KKNnKJs2s3N4w1ZCTCl2JgWnY6ceGcDPA?= =?us-ascii?Q?aaCg2ewq7sPYedeJR7VfhTmKm2431OiH0mzRvOZrfKXGVmBNOn94/RKjbZgq?= =?us-ascii?Q?DmDG26zAnnbZgGW8fgKa3YmMU1kemgOK6RI+DLfXWdmJc5n+H8VmCTRHLtrH?= =?us-ascii?Q?n5Ns5a+4d/RFgR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/2454DcqNwVyfF?= =?us-ascii?Q?16eMX1ardgPvQhzgNO/j6J7ezU84D7QF7wGRZu5jGd99r3iYK6trBqfdMTbT?= =?us-ascii?Q?aDKG2CRFz5kfJ0Em/b7XKjpYE6vyaqQC1rqfbszJSOXcRqRu88GYbhoklWkA?= =?us-ascii?Q?30DC+14NW3wcb9DvqVXdhqTKSIXzxLV90dAUMnUUNtWf+j8KLOEPmHrNh9im?= =?us-ascii?Q?ngEokxHkVwnp6Ypap0OqEsLwvx9zYfSTkZDABVuMgnhzlVBx7r45ylBGXCYE?= =?us-ascii?Q?kbG6q8W6wdzXhogOBG9ERWCLkV/Z1Tc822RuuNRKgtMO/CX+XBRERZieJNv0?= =?us-ascii?Q?hl2oGlInkA3mcYkr2JxcZ+LyqjaKZDqfdwkDuPybQkYZEdM52u2YvHcSFZ0t?= =?us-ascii?Q?5+xbE6WxqOSu8QT3v4srPzOK7qzZvbkK3VOLb4WL?= 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: 2ba246ea-2665-451d-ba10-08dc78b9ac42 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2024 10:43:23.3545 (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: Xq84bPuGjO9NMjwZhfxlROeZCquh8YfSltXaxWInnmpqJuL7VhQbd/yv3kY366GIlHQB1Cujbwfq8zamSCl5fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7607 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 23/25] net/axgbe: fix the false linkup in axgbe PHY stat= us In the event of a change in AXGBE mode, the current auto-negotiation needs = to be reset and the AN cycle needs to be re-triggered. However, the current= code ignores the return value of axgbe_set_mode(), leading to false inform= ation as the link is declared without checking the status register. Fix this by propagating the mode switch status information to axgbe_phy_sta= tus(). Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps") Cc: stable@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_mdio.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.= c index 9fe30e83bc..130a67479e 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -1028,7 +1028,7 @@ static enum axgbe_mode axgbe_phy_status_aneg(struct a= xgbe_port *pdata) return pdata->phy_if.phy_impl.an_outcome(pdata); } -static void axgbe_phy_status_result(struct axgbe_port *pdata) +static bool axgbe_phy_status_result(struct axgbe_port *pdata) { enum axgbe_mode mode; @@ -1065,8 +1065,13 @@ static void axgbe_phy_status_result(struct axgbe_por= t *pdata) pdata->phy.duplex =3D DUPLEX_FULL; - if (axgbe_set_mode(pdata, mode) && pdata->an_again) + if (!axgbe_set_mode(pdata, mode)) + return false; + + if (pdata->an_again) axgbe_phy_reconfig_aneg(pdata); + + return true; } static int autoneg_time_out(unsigned long autoneg_start_time) @@ -1133,7 += 1138,10 @@ static void axgbe_phy_status(struct axgbe_port *pdata) return; } } - axgbe_phy_status_result(pdata); + + if (axgbe_phy_status_result(pdata)) + return; + if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_stat= e)) rte_bit_relaxed_clear32(AXGBE_LINK_INIT, &pdata->dev_state); -- 2.34.1