From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91435A04FD; Tue, 14 Jan 2020 12:49:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0548D1B05; Tue, 14 Jan 2020 12:49:16 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2044.outbound.protection.outlook.com [40.107.243.44]) by dpdk.org (Postfix) with ESMTP id 3CD111C1D5 for ; Tue, 14 Jan 2020 12:49:14 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X1ZzUZf+FRBZL74keeTQ8QIg4L+W9VPVB0Hzpqj2ljiTpuCJED8lA/C418OwnM0Gpm/ve7kn7x1fI8YAOkJNNrFdrgg56cOhUCzxAcYrRI5HCRrnJ1AUsGypEgNDc5ebCj653DTgYJoK9XI9H2emLda8LgaQZFdzbsG7vKA8jOFpIML3BGeKAUvc3DmoE1JAHLZHLze6PNA5mCjlqeJnhpSgqb+fK+kr2ctxRDZrWQFDth9Brf/DBpyLI+u3+z5QBXwsxUiIi7QkRCTwgCIA11Thglj0pXt902JXkcRoWWXbjMwcPrKPr9TOqNRESruJdRTjwVgRfZDMvBCBsFW3iw== 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-SenderADCheck; bh=LDIXrN/JSzMH8Gv+haWWF1yTebXLR87yg+jIKyegdk8=; b=G0Jm7sSVq1UALQvSIU4jPtx8A+ejTc6ac0SrjA23cZQ5Nf9GoRcT5IsEN1xVWR+OHRdRky91vIO6GYj2NBttGnXfUALQYKXvpbsOfRZG1kT/5LxDi0y/P9JHU0jqBwzQ/qIMurkGEbAtFMETqem+ED4AgenxFGLH25MgccKs9sZKqP0MBg5H7lnMHqOAFDbecOq0QwHACzUUM9vgMq/QxsdWesloXf0/1AlaTaVYovWEOfsZax4DNcrbaKShDqUC1IDk0V459LlupKpCAm4QvuityaBGfovajpLYaq7bA2dx6gcBExf0HaCipj7lomVh5QO2JCFgQvoAyj/QlXUaHA== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LDIXrN/JSzMH8Gv+haWWF1yTebXLR87yg+jIKyegdk8=; b=mxaIpT1+g68PjmpUBjloSkmqRVbumAhjHugjQzipNh9sGsAL/4ALNnQ4IMilYMyR/HezlZDSHga7ipMy5k7BbG2RDCMR07kt9HDXNkk1sMnWnp50xrmeaVXSjebHm818jFkkjaEQfJnrHzD7AiTQqXki6pMFG4GHnDp2hjr2WZw= Received: from MW2PR12MB2570.namprd12.prod.outlook.com (52.132.181.13) by MW2PR12MB2588.namprd12.prod.outlook.com (52.132.181.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.16; Tue, 14 Jan 2020 11:49:07 +0000 Received: from MW2PR12MB2570.namprd12.prod.outlook.com ([fe80::ec36:5d88:cc24:c660]) by MW2PR12MB2570.namprd12.prod.outlook.com ([fe80::ec36:5d88:cc24:c660%3]) with mapi id 15.20.2623.015; Tue, 14 Jan 2020 11:49:07 +0000 From: "Kumar, Ravi1" To: "Nandibasappa, Girish" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] net/axgbe: 1/2.5Gbps support enabled for axgbe Thread-Index: AQHVx7Xi0+B5OfP78kyrKMKf2Gqq86fqEk0w Date: Tue, 14 Jan 2020 11:49:07 +0000 Message-ID: References: <20200110125937.6194-1-gnandiba@amd.com> In-Reply-To: <20200110125937.6194-1-gnandiba@amd.com> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_Enabled=true; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_SetDate=2020-01-14T11:50:55Z; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_Method=Standard; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_Name=Internal Use Only - Unrestricted; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_ActionId=3f55dab2-0369-40cb-b4ba-0000ff04fcda; MSIP_Label_76546daa-41b6-470c-bb85-f6f40f044d7f_ContentBits=1 msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_enabled: true msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_setdate: 2020-01-14T11:50:55Z msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_method: Standard msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_name: Internal Use Only - Unrestricted msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_siteid: 3dd8961f-e488-4e60-8e11-a82d994e183d msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_actionid: ecd540ef-56e6-4de0-b72d-0000c16e9fef msip_label_76546daa-41b6-470c-bb85-f6f40f044d7f_contentbits: 0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; x-originating-ip: [165.204.157.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 6a76180c-911b-4c13-3c51-08d798e7c34d x-ms-traffictypediagnostic: MW2PR12MB2588:|MW2PR12MB2588: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2582; x-forefront-prvs: 028256169F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(366004)(39860400002)(346002)(376002)(189003)(199004)(9686003)(55016002)(26005)(6506007)(316002)(110136005)(186003)(478600001)(7696005)(5660300002)(8936002)(81166006)(71200400001)(81156014)(66446008)(64756008)(66556008)(66476007)(2906002)(86362001)(76116006)(33656002)(52536014)(66946007); DIR:OUT; SFP:1101; SCL:1; SRVR:MW2PR12MB2588; H:MW2PR12MB2570.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: abqpPxsN9ovTY1GTkiS1RJbL335BNwwXDsTY3GSD+LR5jZ+ECvP/y5HxKHtUZbAcjHl6Uk1yUYcDYM5ThUM/oUNLlGr5XKBbTz9kvocTxt1UJEtmys5ogkzQr+NVjNyRfoxVJ/BDEgX3uOi5Bm1LVON04aPQo+Y3yZ45vkZyzXwYd+EjXQv9jxXtnXrV4vWRQTdg4tNY9Ij8HIr4H1izi4jRG3sCsgbmKZOrMfdz/saFHDZf0EN68HMwvg7dV3qyPcB3jtQZDcU6G9uPAihM11UfDvw03gqI6UONDwdHHs8weJE28HynN3MSoQR9XiilKjauG+O4+mQibRYrs3nn9xRIdgGEkYd2fkM1+NQw/7FKme2bjrYiDiZXw7Xq03hq0ASxp4PLMreGjUjVx9Mv/O2lr/XrdnTA09nGGxtxpL9oKktI5rA4W5rurz5HhxNd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a76180c-911b-4c13-3c51-08d798e7c34d X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Jan 2020 11:49:07.5581 (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: R2iaApcalhcMg36mQZUP4GqNsjcPLU/Ov0Z5vkeT1y0d+9DVO766BXC8n14dkN8vqnQ1JeWkgWz1fUVnBvGMmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2588 Subject: Re: [dpdk-dev] [PATCH v2 1/2] net/axgbe: 1/2.5Gbps support enabled for axgbe X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" [AMD Official Use Only - Internal Distribution Only] Looks good to me.=20 Acked-by: Ravi Kumar Regards, Ravi +[CAUTION: External Email] + +From: Girish Nandibasappa + +Added support for 1Gbps and 2.5Gbps in axgbe dpdk driver + +Signed-off-by: Girish Nandibasappa +--- + drivers/net/axgbe/axgbe_phy_impl.c | 50 ++++++++++++++++++++++++++++-- + 1 file changed, 48 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_= phy_impl.c +index 2267c5f81..f0dc11695 100644 +--- a/drivers/net/axgbe/axgbe_phy_impl.c ++++ b/drivers/net/axgbe/axgbe_phy_impl.c +@@ -610,8 +610,7 @@ static void axgbe_phy_sfp_parse_eeprom(struct axgbe_po= rt *pdata) + if (sfp_base[AXGBE_SFP_BASE_EXT_ID] !=3D AXGBE_SFP_EXT_ID_SFP) + return; + +- if (axgbe_phy_sfp_parse_quirks(pdata)) +- return; ++ axgbe_phy_sfp_parse_quirks(pdata); + + /* Assume ACTIVE cable unless told it is PASSIVE */ + if (sfp_base[AXGBE_SFP_BASE_CABLE] & AXGBE_SFP_BASE_CABLE_PASSIVE)= { @@ -1238,6 +1237,47 @@ static void axgbe_phy_kr_mode(struct axgbe_port *= pdata) + phy_data->cur_mode =3D AXGBE_MODE_KR; } + ++static void axgbe_phy_kx_2500_mode(struct axgbe_port *pdata) { ++ struct axgbe_phy_data *phy_data =3D pdata->phy_data; ++ unsigned int s0; ++ ++ 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); ++ ++ phy_data->cur_mode =3D AXGBE_MODE_KX_2500; } ++ ++static void axgbe_phy_sgmii_1000_mode(struct axgbe_port *pdata) { ++ struct axgbe_phy_data *phy_data =3D pdata->phy_data; ++ unsigned int s0; ++ ++ axgbe_phy_set_redrv_mode(pdata); ++ ++ /* 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); ++ ++ phy_data->cur_mode =3D AXGBE_MODE_SGMII_1000; } ++ + static enum axgbe_mode axgbe_phy_cur_mode(struct axgbe_port *pdata) { + struct axgbe_phy_data *phy_data =3D pdata->phy_data; @@ -1408,6 +1= 448,12 @@ static void axgbe_phy_set_mode(struct axgbe_port *pdata, enum axg= be_mode mode) + case AXGBE_MODE_SFI: + axgbe_phy_sfi_mode(pdata); + break; ++ case AXGBE_MODE_KX_2500: ++ axgbe_phy_kx_2500_mode(pdata); ++ break; ++ case AXGBE_MODE_SGMII_1000: ++ axgbe_phy_sgmii_1000_mode(pdata); ++ break; + default: + break; + } +-- +2.17.1 + +