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 B3B4E44078; Mon, 20 May 2024 12:40:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E6CE40395; Mon, 20 May 2024 12:40:36 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2060.outbound.protection.outlook.com [40.107.94.60]) by mails.dpdk.org (Postfix) with ESMTP id 29D14402ED; Mon, 20 May 2024 12:40:34 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K7NulO3s3PtKxANm7wB8f1+gJIBaPf5kC3ImLq9rVgKV1f3ETAUTxKsgE6N2KhfvJuBEz0VnFvqelNa6Fr9oEPTnaPCnK7ZILgyWbijKgS5cg/prxTnW2CLoLDRHtLiEPsq7H+R0xxXXW3+3Fi+9K4MsRC86ooJwuuVTAx3lClZKBwZeY6ppvVgh4zURR8NoFo+CoCWr7CXwe5FwhEoJZWT5Ecj3Necgm4WBhwGmEz7eRxlO5THOUybzDiC1HywV77uzn3JquUpUgIRwoziNn7QXJ/dBzpxis64IOT93qCZ0mktIEZjOF8NusmFv1XX4C9CIWfJY6PoXQ+AJ4hDsFQ== 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=4b30zZ5gT8rL2buxnEcPSPCZ8pkmXVuONs2K4F+GyrY=; b=a1ChM6zdKX8iIFyImX7tobnAPEOmTmkNSSUlWY6pwVmrQWD5m5Hqsgpm8TcCCiQgG55QvPlYSx58//qlLCf7CMzxN61GoqglrimYKUllr553XlWXhGeLhkkt8vtf2ttYVcg2+Slj80H3JiWz2JKL6CV3fyTDCL9jEigIWWN17YqO5yC4M5iXj+verA/bGf3z8uPauwGPVVI3IatzblNDpMReLgX2MiXJtPlsCjl3teBg5EAwGa8A9Slzfnb269B7nytYsuOq/hGf0ytKqzwU/lp3aV2JEikXDKXD+Subm6gikn/itfNehkAo/kIk5+rQWl82VbPfCli9HB0FRmj/vQ== 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=4b30zZ5gT8rL2buxnEcPSPCZ8pkmXVuONs2K4F+GyrY=; b=cI6G16BwXpQ5XQJBIK/flYw2M1q2kc/Y2M3db6GIHcU9glP4WNHL9zuBdzVlJRnftZK9SYX3yvM/ol66BbOX1vvZVrOuf0oCS/6wgsAbifZJfgl7G60fAG7W7lJ6tEUL4hutbtZm8VCbiSkpa0aPo5Mn4AIr1o+o9u+ZKtz9VuA= 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:40:30 +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:40:29 +0000 From: "Sebastian, Selwin" To: "Ande, Venkat Kumar" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v2 02/25] net/axgbe: reset link when the link never comes back Thread-Topic: [PATCH v2 02/25] net/axgbe: reset link when the link never comes back Thread-Index: AQHaoHwtWJQgrOQX9kebH6hWS5MIubGgA0AA Date: Mon, 20 May 2024 10:40:29 +0000 Message-ID: References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> <20240507124305.2318-2-venkatkumar.ande@amd.com> In-Reply-To: <20240507124305.2318-2-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=1442a5a0-9a45-4d4e-bb71-4540a639d438; 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:40: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_|CY8PR12MB7123:EE_ x-ms-office365-filtering-correlation-id: c14b3c8d-db25-47de-9358-08dc78b9447b 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?avuj2c4o3oL99ccQukril1qK1o57p26ZBwuSdiM5sL3k69c9W6DXj+7pGO34?= =?us-ascii?Q?eDssV449J4fZNtJk6J2xze2m8nuNkqzpItJKavolNXBnz1uL/49zxolCKH5A?= =?us-ascii?Q?9uZM+TWH247nD3tRdhn5T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w8YeiagiBf1mvAa?= =?us-ascii?Q?F/A3w93GcpfSZFpHXHH0unIQUFZQZMD7FcFRMnbMmqyzVIzlVMPvZXMSFNFd?= =?us-ascii?Q?CNM75IaR79825+rYcdowKqsXnTy9ONUXqmlYhTRMTQF7N/tjS4cpmOcVyv2L?= =?us-ascii?Q?0v9fzCymiVEg18krSg+GXl9DOAQijbyd7pLdCW34nT6x8u9na7dMfNedvHqg?= =?us-ascii?Q?U/FMRb86dMqc+Bnt9it3AAKt0uy7sZmppZ22FoaNrOT2qCoV76nQgletWGjt?= =?us-ascii?Q?BT9ZBvxQSmqmKRXIOt8EQP6wZ2C3oYKunskDGj4jCdqgujUKk59kiDigzWHd?= =?us-ascii?Q?PR7dOZI6s2yRfWsLsUGicQje9GS2+bud88EGebyNZrprpA=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?wb6HdMECmswamHGITRZfJhSGmMBJBRKK2rc+LqU+Lu3pOlZQhI8yqtPBzlh/?= =?us-ascii?Q?/67G5enFSmHJWxLTzVlTboUWT4SbV9WjZ3kNme5Ou56IcKH/gke6BkQ9FBRB?= =?us-ascii?Q?HXCzcDmJS+v1xG6XqbR9iOCYHPvaYaqeJcAqtufyHhDwsK96TEFB+vxaQSf/?= =?us-ascii?Q?v1LdF6Vk4RoxUskKVbJNeGIOqSSKfasVewQ0KIEZMPPsRw2Mxp2+90PQmZSy?= =?us-ascii?Q?9EH2gDJKDavoqCWoXYsRKKCbblv2pepZli3evFmEDHHZ9RHpdDcVSkbXO1RM?= =?us-ascii?Q?VbofVLbZqtJ8trQfWQUNZHOunRp3MjE8kCyxNQmc8/FLm/E8ABaocP2dgoI4?= =?us-ascii?Q?WdWVg86RSfSnPtdi9XD1ffiqWYzyWhhzk8ghDdLHLtvzVw4UDp8egfsD33SM?= =?us-ascii?Q?mOGKyabEJKtomsGmshgYRDxPJ1s9xeoX8+eXOi/w0kO3zam9mbdvX5wKfIwX?= =?us-ascii?Q?dw6+xwTrVtItLLLxRHwRyTcE5xbntixwBnH+5YCMr6zM1lboaONGj9pzrIvy?= =?us-ascii?Q?+trx1fyibEg5e8GwkeWW7/La9pwxrxy/lpjKDrfevrYaPoqI6aF5TflZyWsj?= =?us-ascii?Q?Yt2ouRp+okL3HiE61VD48qb5A8Q7jTcH4hRIdGTglt+bC9civCDp0FSoAs1m?= =?us-ascii?Q?OsCW81oXllY4ZbxRtu4phZFlGz28xFXUifBauuacO/UcFtolztML+UqiYhGg?= =?us-ascii?Q?XiFoO2ItjDZKF0wad05YcZYAQ2xR29ChUJKV1Jkfb8l8cmu3HOv2LQp3x+rW?= =?us-ascii?Q?cSYOjE9t0a4TawpE1BirV31hfTBxTdV/N6iFf2Zr38X8zlGpI5yf+9agPtE8?= =?us-ascii?Q?o9Hg7dhlfOWr9BetTIqPARcws0OTz8GeqOkzbg51MVX6VhcLq/Swn2MxcsFD?= =?us-ascii?Q?v8wh+/YAuYr299Vgq8ryDmM/uSTEwpa7iKSofWvEMccyMI2FEsEdpzoUOgHu?= =?us-ascii?Q?5nksEHw2IDOPiDAXHtNg111ZDZwyVwobJWnbR6O3elS/3ReefwG3MB5Fp06p?= =?us-ascii?Q?VQBT+YYQviXui1cOdAqGQdJmiq+2fCrIdFQmylT4uKooU79bGf8c9b3F6opp?= =?us-ascii?Q?unf/eRI0vwJW1hmoDwFXDlHWNaNqTKJmkHVr6U4lkVav9BSCPzIP05bZv2jW?= =?us-ascii?Q?FfJKR+I3K2oUn3aZfRFv6UtFZvTiz4qYZIdjqK5kGcQe0bECgm20UTLY0oD2?= =?us-ascii?Q?EQUmqmtBva4pN8xulTPDoBTy/Yxsr/4QBSOzgAytKge4DZrlCIKbUZz+K09U?= =?us-ascii?Q?lyt3b0k7kd721Z70ormC1ibu48jABVCJMhBVjQu8819XiRzEQGf/58hKaglS?= =?us-ascii?Q?VmHnZQSxrQyqHs1K3+HWp0MBy05ljyeSPYblU1DGi0czIv3AYTw3laTHNS96?= =?us-ascii?Q?vMUuSczvBXhOvJj4IE34etMiV0eF9MTYA7oZTZ7Zas5HdTg3rG1JPM/GkWVN?= =?us-ascii?Q?BbjPA6SpZOch87AiB1NSzXcFyjnqwMLug6cGEx++DgyFE8hXT+jUUMNv/npw?= =?us-ascii?Q?aH/KNXhhsYCN4Qb7lfA9OnqtfAdHp3rHek+1tPQawl3rTBv0uOKkO98isuCc?= =?us-ascii?Q?Huepk2eu7cm31UcaYLg=3D?= 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: c14b3c8d-db25-47de-9358-08dc78b9447b X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2024 10:40:29.2487 (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: BIFhxgKvFk7os4Iag12GwEmrcUp9VKCfXMBbZA3sNk09/WzhCO/U/VcEFegYQhOgy2Mu8aEFxaHbRGDsh+W+Nw== 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 02/25] net/axgbe: reset link when the link never comes b= ack Normally, auto negotiation and reconnect should be automatically done by th= e hardware. But there seems to be an issue where auto negotiation has to be= restarted manually. This happens because of link training and so even thou= gh still connected to the partner the link never "comes back". This needs an auto-negotiation restart. Without the fix the user will not see the link up status Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: stable@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_mdio.c | 2 +- drivers/net/axgbe/axgbe_phy_impl.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.= c index 913ceada0d..b03bc471cb 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -1051,7 +1051,7 @@ static void axgbe_phy_status(struct axgbe_port *pdata= ) &an_restart); if (an_restart) { axgbe_phy_config_aneg(pdata); - return; + goto adjust_link; } if (pdata->phy.link) { diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_p= hy_impl.c index 44ff28517c..54fe9faae0 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -1697,6 +1697,13 @@ static int axgbe_phy_link_status(struct axgbe_port *= pdata, int *an_restart) if (reg & MDIO_STAT1_LSTATUS) return 1; + if (pdata->phy.autoneg =3D=3D AUTONEG_ENABLE && + phy_data->port_mode =3D=3D AXGBE_PORT_MODE_BACKPLAN= E) { + if (rte_bit_relaxed_get32(AXGBE_LINK_INIT, &pdata->dev_stat= e)) { + *an_restart =3D 1; + } + } + /* No link, attempt a receiver reset cycle */ if (phy_data->rrc_count++) { phy_data->rrc_count =3D 0; -- 2.34.1