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 5212BA04AB; Mon, 24 Jan 2022 17:40:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D98B44115C; Mon, 24 Jan 2022 17:40:01 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by mails.dpdk.org (Postfix) with ESMTP id 2CD7140040 for ; Mon, 24 Jan 2022 17:40:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGxZQUUrVA5L1f/Xdsaq0QuEkRXCdrpAlOM5tPSyHh14xyMT8qspyH7GmVvXluajdBKzDU8Mkpg8KbXHu1B1uuBtIop3A2SbLYM10A3Hr11pWC/mruDU3w0NDyMckmVZBfwFOds00rSem2i/YBTv/G0vhYneNUJpmlOXfjtpJAVQlsPmmYpG+5FHuhf9nPKCyDQX0vxpNpiUk5YcitTC4ZUX5CF8uoRanh1fX+ToJPT70USrlAnfAT2ETmm0CV10AgS/9AJMB4pScveJ1Jdac8TraURjDdY9stwMqF1mz5eodag0y6XXKv3EhlrpnKrrP6JxsRvSrHy0fmaAQ2s+Bg== 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=xlZg5mTShz815vTlZCkMnVxsq2am7UIQHEtD7cOak6M=; b=MqkpjvtQ2Eq9AQzlf8Ff6APKrZFVqDDok5IOnhJ84Pv02k+8x1fm6cM3gz0FlfHqMa/c/uDPREzMfm7V2e1rvdzDnMO+FOJ/IVkI6gPKI4YeCq5hHeu+NIBlfei2aJihhexZuuE1HaIYQGMAXFKSDrxKHOlNcDhwM0dZCJNmqqVoJIkb1FbJZIc3aX86aRqbTmV6I1mL93oK0RAej7hSZFrkAP5oPvUzB/9u0iMd0uJrVTqoaSndzKhpkeT8Nc0O+5cDSqEnI6sTn3cSrVLb5GPOASfKmZ7IHJpEJih25y3pcj1Vg3anZ2l5PNM07bN5tH6LajR+iz4eY6k4a0An9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=xlZg5mTShz815vTlZCkMnVxsq2am7UIQHEtD7cOak6M=; b=yMNfyn/+tqENyhuEOvjW71BjsGulROW5L40ZMaKSzJPxeMpId28E89FiP8XTjHuib8VaXuyv3jiv3fNPYTpla/Te0uamJMszXLC+4bfyeBIuTbs3tu9iH4yXZ2d89YC5fLhKe5dIs5+8QWhj3uErWlcZ3Rs7USawg34kHusI8II= Received: from MW2PR12MB2538.namprd12.prod.outlook.com (2603:10b6:907:5::14) by SA0PR12MB4525.namprd12.prod.outlook.com (2603:10b6:806:92::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.8; Mon, 24 Jan 2022 16:39:58 +0000 Received: from MW2PR12MB2538.namprd12.prod.outlook.com ([fe80::ad98:6ba4:7d63:fd6a]) by MW2PR12MB2538.namprd12.prod.outlook.com ([fe80::ad98:6ba4:7d63:fd6a%4]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 16:39:58 +0000 From: "Namburu, Chandu-babu" To: "Sebastian, Selwin" , "dev@dpdk.org" Subject: RE: [PATCH v1 3/6] net/axgbe: simplify mailbox interface rate change code Thread-Topic: [PATCH v1 3/6] net/axgbe: simplify mailbox interface rate change code Thread-Index: AQHYBhY9U0j+h7/Nkkae6JbWeA5PSaxydcxw Date: Mon, 24 Jan 2022 16:39:57 +0000 Message-ID: References: <20220110113509.553184-1-ssebasti@amd.com> <20220110113509.553184-4-ssebasti@amd.com> In-Reply-To: <20220110113509.553184-4-ssebasti@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Enabled=true; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SetDate=2022-01-24T16:39:49Z; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Method=Privileged; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Name=Public-AIP 2.0; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ActionId=e790b563-cb2d-4c60-9f5e-8427aeb7cb00; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ContentBits=1 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_enabled: true msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_setdate: 2022-01-24T16:39:54Z msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_method: Privileged msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_name: Public-AIP 2.0 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_siteid: 3dd8961f-e488-4e60-8e11-a82d994e183d msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_actionid: ffac94a3-5ad1-4917-a3b4-32ead72e633d msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_contentbits: 0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8f6cb196-2474-42aa-6286-08d9df58289a x-ms-traffictypediagnostic: SA0PR12MB4525:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rYYYlBXM3f1HvrdjEBE5MpQQ/NOs4L+AoFsOOmBsxxWHxB93eNo7lXGuAzkINf77kqC4xaLZyvycEMZ6D+FyFh0laGN77OjvJSnpnAcvVxTJa2kWtf7HnF8TG3jYQ1yGs6H9EIiSCRzUwUOznFLmYyA2tyt26nWBv9xiPT9lHoKyWwvaoyjKHZfMgZW1Srscr5nCvdRhXzt0rda650u2+QY0PRvuPGLFIX7CSI0o5JoOOPvaENWvV7fqG8Tp/5z4ekZkZx6BdimUzUtYTkPBwNJ/1LV21GEhXQgqFca5JPspBueZwEDSmfSop0A3hX8KLN0Z+Z15L8RVcUr+rXTGpWOQClOwhW3mjqFKMIbHfV+nty0Tuu7stYvLqeTl3P4n7NxQwgdyUw49SsDgxYkjuD1HxuFnvYXbdxieUHSL780uESz5QVKC0ochfMCkdrj95wJPDHk9RG+g8pEVq3VZ/9socXlBLUK0b4jw8abY1r7slrayXgY21/JHoOSpRbaqUvUH/vJEbyacTuRjm+MEr+pozyls31yibj+F4Dxw5kUCuKZS7KlTU3b1Ur58TkHcpxlf/VOfznbGgZpFLyRsDdc+n/x82M09zcIiG8SKc7e4tc+OjuFceJeruMUiXbWCphCXgcs53admfdfTo+e2BSn6usBIjxGQdmhoUkneztLg5l3/NxPnnfvE9q5Fmw3nQZnwxxcGHZajkd+XnjbZnw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2538.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(186003)(76116006)(38100700002)(316002)(66946007)(66556008)(26005)(6506007)(53546011)(38070700005)(508600001)(83380400001)(2906002)(66446008)(8676002)(122000001)(55016003)(5660300002)(33656002)(15650500001)(64756008)(71200400001)(86362001)(66476007)(8936002)(52536014)(9686003)(110136005)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4mdp23WqVStIRsU03pjJ5WbiLU0PB1QYfasoYG17VlJ1lYrbCkUiqAU4RtF6?= =?us-ascii?Q?VbM3nRknaCo6b9sEQko+NC/9kSZ1kIAuzNVH/OeW9di+DZuEQ9cCqNpEJlFe?= =?us-ascii?Q?5RQYjKzoOFE/VUn1M6VmdJlGzm1Iuo8bDS4pb++UZl4hVKPfGAYpY7cZPkf+?= =?us-ascii?Q?p6ft7G0+LAqTla3ywzpapZmLhd+d3SfPNqAul6DhChCaLqKWukQdBRrk6747?= =?us-ascii?Q?j2KDJJ8Wbltf+IPY3vFX8wpcqkFV4/I/WaKOZJ/hrTA80zknjw4EzdG1iKL8?= =?us-ascii?Q?AqhJL0Yku9eoXKuRXVkl1vFaAtvB/bYI9SPPY7/u8vy9aPh4n10LJ/S6LP5t?= =?us-ascii?Q?MfYJjwyiHXYaGjIMuoyo6DdgTRTgC3FJbOzkKniufgtPB2NIXvdFfe+fMpRo?= =?us-ascii?Q?gbPez+up+lev4fHvCVZJ1ZwxiYfytAAknFW3IYF8rvVqfa/9qFx8P6HVozoB?= =?us-ascii?Q?Hzwm2Add3nNo/UrxvKDGs1FzIg5YXupxrY8mYDk226o00kW83vNswFbk4Frh?= =?us-ascii?Q?GRwxlFV6LryQCQ2d+qRZfP8nbitJuXAqdRzPH1JjCxb80dBAohzIquQwEz1E?= =?us-ascii?Q?WvEqn8ALxZuhfyBXRuCAzPE30wBoFMOZxnDc6Gyg05rCyQ4MyWDikQHbv3Tp?= =?us-ascii?Q?dwVUNwhadPhxHXFJ2fYVVwUCi+7sWKhZzmL0iMno/QzcnFz8ee4har48xQU6?= =?us-ascii?Q?Q4g3HeruHwOLHNLg0HzouHzI05fSJLVqumBZAV8JK3gWU8RxRaiAkFCt8O76?= =?us-ascii?Q?nIMZE9RIorWAuLNzWlSqvikSucVzweLoACSu3Y7thx4AD7NDGgGVdrEBSNyC?= =?us-ascii?Q?3Pu2GkyeEsaZwrgTgirDOjLQ+zUN+owetxlRZoanIjzhISZ1yZNRS68mwfNg?= =?us-ascii?Q?zwimgTiw21TpL8FifDDC9Cae2UL5kcJx0e0MwGuEdRmB8k998QVdFIxVSdru?= =?us-ascii?Q?gPSBWWpTDuObQ1YSr7vP/PHM2SybrxdFyeG86uGCxZR1Ij2TpEDFrZqvxzPg?= =?us-ascii?Q?ZfqL/MNIkgnIpE97/vz9eIt7/t7SCDV4feVypUfxGjIt2V3xiz+UfQkM8OWc?= =?us-ascii?Q?vg/a0Mzmcng63X7z8Q8bmQ9ODa1A2+VdaNLyOe/cYLgdY93RjSTPczuUkHCe?= =?us-ascii?Q?hvy6XZMAAQa2ccHrnkz59kMR9oNgZ+fcLFT9UfalLT9MMCFec9xK77jaxkAT?= =?us-ascii?Q?HJ5+bmzq+UaXoYfWK15lx/+ylh2oFC2sF9lFfCyiDs+KpbdtO87b4izFKWnK?= =?us-ascii?Q?meIh0k8ytEYfZLPRbxlPXEM8omZUxZoWvlAk3eXzsHABoz+I6BkCBE5PbPQD?= =?us-ascii?Q?vZPEVIoSQfFlIN1a52H86NxHw/DTjo13m72hSKXgOTdwr4jqtXKvWaxXPfnq?= =?us-ascii?Q?3c9KQ/C+8ehtj5/H/GPfZ5Vll3bofVPMSx1UioVyc74ib8K6Zg+fWkgg4eXi?= =?us-ascii?Q?9HfkIZrH+hCpXp1EwnBi0aQ87gh+AwBkOcnCrE0MFncW5v7dOCeDaOJtuU4G?= =?us-ascii?Q?s3qSsIxqFnhO/yIpdaGF4HwwF5nLKdRc0+qgWYmPpu3JUHxBmT2kBxRxiiV1?= =?us-ascii?Q?aVJCyELfuHHZ3WkUcWT87BYwrcOEF+PEMhWRe9/w7NlOe5hMtCdQfCswyUig?= =?us-ascii?Q?KPUOLwPors11jdY2JbKu+G8=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: MW2PR12MB2538.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f6cb196-2474-42aa-6286-08d9df58289a X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 16:39:57.5802 (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: kBc5f5we5JasFIPtvD5VYiYiEuLE1D/knHoe78vlaqC/zEKx0nbLUGqWcvDkxBsBmUOnx+qvENBEex45wcUS4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4525 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 [Public] Acked-by: Chandubabu Namburu -----Original Message----- From: ssebasti@amd.com =20 Sent: Monday, January 10, 2022 5:05 PM To: dev@dpdk.org Subject: [PATCH v1 3/6] net/axgbe: simplify mailbox interface rate change c= ode From: Selwin Sebastian Simplify and centralize the mailbox command rate change interface by having= a single function perform the writes to the mailbox registers to issue the= request. Signed-off-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 95 ++++++++---------------------- 1 file changed, 23 insertions(+), 72 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_p= hy_impl.c index dc9489f0aa..0894dbf74b 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -1207,21 +1207,26 @@ static void axgbe_phy_pll_ctrl(struct axgbe_port *p= data, bool enable) rte_delay_us(150); } =20 -static void axgbe_phy_start_ratechange(struct axgbe_port *pdata) +static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata, + unsigned int cmd, unsigned int sub_cmd) { + unsigned int s0 =3D 0; + unsigned int wait; /* Clear the PLL so that it helps in power down sequence */ axgbe_phy_pll_ctrl(pdata, false); =20 /* Log if a previous command did not complete */ if (XP_IOREAD_BITS(pdata, XP_DRIVER_INT_RO, STATUS)) PMD_DRV_LOG(NOTICE, "firmware mailbox not ready for command\n"); - else - return; -} =20 -static void axgbe_phy_complete_ratechange(struct axgbe_port *pdata) -{ - unsigned int wait; + /* Construct the command */ + XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, cmd); + XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, sub_cmd); + + /* Issue the command */ + XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, s0); + XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); + XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); =20 /* Wait for command to complete */ wait =3D AXGBE_RATECHANGE_COUNT; @@ -1240,21 +1245,10 @@ static void axgbe_phy_complete_ratechange(struct ax= gbe_port *pdata) =20 static void axgbe_phy_rrc(struct axgbe_port *pdata) { - unsigned int s0; =20 - axgbe_phy_start_ratechange(pdata); =20 /* Receiver Reset Cycle */ - s0 =3D 0; - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, 5); - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 0); - - /* Call FW to make the change */ - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, s0); - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); - XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); - - axgbe_phy_complete_ratechange(pdata); + axgbe_phy_perform_ratechange(pdata, 5, 0); =20 PMD_DRV_LOG(DEBUG, "receiver reset complete\n"); } @@ -1263,13 +1257,9 @= @ static void axgbe_phy_power_off(struct axgbe_port *pdata) { struct axgbe_phy_data *phy_data =3D pdata->phy_data; =20 - axgbe_phy_start_ratechange(pdata); + /* Power off */ + axgbe_phy_perform_ratechange(pdata, 0, 0); =20 - /* Call FW to make the change */ - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, 0); - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); - XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); - axgbe_phy_complete_ratechange(pdata); phy_data->cur_mode =3D AXGBE_MODE_UNKNOWN; =20 PMD_DRV_LOG(DEBUG, "phy powered off\n"); @@ -1278,31 +1268,21 @@ static v= oid axgbe_phy_power_off(struct axgbe_port *pdata) static void axgbe_phy_sf= i_mode(struct axgbe_port *pdata) { struct axgbe_phy_data *phy_data =3D pdata->phy_data; - unsigned int s0; =20 axgbe_phy_set_redrv_mode(pdata); =20 - axgbe_phy_start_ratechange(pdata); - /* 10G/SFI */ - s0 =3D 0; - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, 3); if (phy_data->sfp_cable !=3D AXGBE_SFP_CABLE_PASSIVE) { - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 0); + axgbe_phy_perform_ratechange(pdata, 3, 0); } else { if (phy_data->sfp_cable_len <=3D 1) - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 1); + axgbe_phy_perform_ratechange(pdata, 3, 1); else if (phy_data->sfp_cable_len <=3D 3) - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 2); + axgbe_phy_perform_ratechange(pdata, 3, 2); else - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 3); + axgbe_phy_perform_ratechange(pdata, 3, 3); } =20 - /* Call FW to make the change */ - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, s0); - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); - XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); - axgbe_phy_complete_ratechange(pdata); phy_data->cur_mode =3D AXGBE_MODE_SFI; =20 PMD_DRV_LOG(DEBUG, "10GbE SFI mode set\n"); @@ -1311,22 +1291,11 @@ stati= c void axgbe_phy_sfi_mode(struct axgbe_port *pdata) static void axgbe_phy_= kr_mode(struct axgbe_port *pdata) { struct axgbe_phy_data *phy_data =3D pdata->phy_data; - unsigned int s0; =20 axgbe_phy_set_redrv_mode(pdata); =20 - axgbe_phy_start_ratechange(pdata); - /* 10G/KR */ - s0 =3D 0; - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, 4); - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 0); - - /* Call FW to make the change */ - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, s0); - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); - XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); - axgbe_phy_complete_ratechange(pdata); + axgbe_phy_perform_ratechange(pdata, 4, 0); phy_data->cur_mode =3D AXGBE_MODE_KR; =20 PMD_DRV_LOG(DEBUG, "10GbE KR mode set\n"); @@ -1335,40 +1304,22 @@ static= void axgbe_phy_kr_mode(struct axgbe_port *pdata) static void axgbe_phy_kx= _2500_mode(struct axgbe_port *pdata) { struct axgbe_phy_data *phy_data =3D pdata->phy_data; - unsigned int s0; =20 axgbe_phy_set_redrv_mode(pdata); - /* 2.5G/KX */ - axgbe_phy_start_ratechange(pdata); - s0 =3D 0; - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, 2); - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 0); - - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, s0); - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); - - XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); =20 + /* 2.5G/KX */ + axgbe_phy_perform_ratechange(pdata, 2, 0); phy_data->cur_mode =3D AXGBE_MODE_KX_2500; } =20 static void axgbe_phy_sgmii_1000_mode(struct axgbe_port *pdata) { struct axgbe_phy_data *phy_data =3D pdata->phy_data; - unsigned int s0; =20 axgbe_phy_set_redrv_mode(pdata); =20 /* 1G/SGMII */ - axgbe_phy_start_ratechange(pdata); - s0 =3D 0; - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, COMMAND, 1); - XP_SET_BITS(s0, XP_DRIVER_SCRATCH_0, SUB_COMMAND, 2); - - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_0, s0); - XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); - - XP_IOWRITE_BITS(pdata, XP_DRIVER_INT_REQ, REQUEST, 1); + axgbe_phy_perform_ratechange(pdata, 1, 2); =20 phy_data->cur_mode =3D AXGBE_MODE_SGMII_1000; } -- 2.25.1