From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0065.outbound.protection.outlook.com [104.47.34.65]) by dpdk.org (Postfix) with ESMTP id 91E1F1B1C0 for ; Fri, 5 Jan 2018 10:53:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=M/NIbTA2aweC5oNDGW4aS/iu8Scw7ROr8D3Stp+pWNA=; b=a/DiWcNa66T8KhmsjiTMiVKJ2t+ECAv48AzKDnNNnpfrt13wx5e4mTp6YZSJ8DDvkVre6qA2Ca3aUtt60pFQmLf0leQFXszm1SHIwXEIUG4ASjeWKa0hPlL9xTDy+pu5KkknLVSY7VN9y50M+5Mju63cReCBiIU6XNPRn0+IqeE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1506.namprd12.prod.outlook.com (10.172.24.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 5 Jan 2018 09:53:10 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 5 Jan 2018 04:52:15 -0500 Message-Id: <1515145938-97474-13-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> References: <1512047472-118050-1-git-send-email-Ravi1.kumar@amd.com> <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: BM1PR0101CA0031.INDPRD01.PROD.OUTLOOK.COM (10.174.221.17) To BN6PR12MB1506.namprd12.prod.outlook.com (10.172.24.147) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5eaa19f2-8c8c-40c3-6752-08d5542221ed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR12MB1506; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1506; 3:+K1izlBUoDi9RAh0jUREWPn+ygfk9WFMssqlKbWTUmxQpF5NpEE21omBK+ZwHE7Bk1rX50EHtLwo9vAQj3FQVZSaTIixlRBunzlJJxxqyeF1EgF6ncaL9ARzn7h7SD7ZySEhI2hi3/MUKGIr6q+maXjftKzlZS5MUoYGKRvHgt0CZek/HOrdPJZM+7y1vJHiCPAcE3GMmx8JRy8D3k6a7fFL/NwuSOcOawkHEfHrXzU3SuDKh6c5b2IAbm2hTvfq; 25:khn1uZXPXfmlVoG6PRFN/Msuk4Q3uhxDJFfzg1IeHDqKVgbUg5OorrfDUW2KBUClGSI7S2tD7Twqxb0bIHvVX+PDtBtZFHj4s8/4QIEV3O3/TylYZecFAnrSjzvS0E9wDv6fyKvnbyB8RbR6YNHg4fWWCx/2TAVVv+scjsaLH0zCDxemux8u12tW5cB8iYrFH3WlVtfW+0oREARSbVmX+3Ybp5to+18K5+6y0g0Jx6CUxahzFw3cLLhBPDZS5oTrMaBpk0/xl53WmoCvdw9wbIREAlAka1ivTl4QUXBbcJDbV6KZaPgLnQ4ssv4kuvNiLvpch6//HNZ927tRHPxBXg==; 31:XIF0NLNYiWqzSK4n0ZNsAQt1cuRQm/igW7GMxgVy4Vy3B5D7qHTO7SssvgWhcMNpekZ37IabzYGmO7R4svSdRCToqL7E6wp/U8CWqjkExpBm1hfEi4y4vLfseeA4dQCeR03e6OH0Mfa4WJ1BfenBxN6eHUQDLBFyC3UNiAUFn3d2n8ZIXrEb5zximtgtywxxu9bxI/NIFOOG+EDi0ijCtpLKwZ7bV89gtPe1WvNlVXI= X-MS-TrafficTypeDiagnostic: BN6PR12MB1506: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1506; 20:DsS+WCG0DCcnlFOXGhkYsVvfxUNKtohztN1IjO6qAZ/t58Hx6kIzAQl1s7/GIX56dV2AJ2gSLSycUCXFns+G2InzhiSdbDvt3FO0b88sBU3HVeEvmzRbkzV6AQU6zysrzYIIzyE6H3e0yRJz4+g3Ve7q6ojPLRnc6DHnyNAN2s3CokEdDPuQsSWXfeXjJRRg8bqf07Men1vnto+3GIvghS7dEGD1JnUaJCJI8L3Sn9mqziCLM4jXK+Hz+z9GsRC0cwbfVgG1OywPjW6HNMVVJtqAntWxS6uSeAqJpYG0kw2GbT0bVQzhd6j1MoIqB74tK0q4rhoCg14bbD8198quu0yJWv5CZkMtUmhbDBfPk91tpNuBEbrSWhLEFHclJeheMZlvXYOQPcpKE3GdxRbudzzBgme5T9IiEERXOqxUaU3QAUA2YmfQgePlQE65+K3glNl1SRwlAwV13+R02K0V21mRanhCtJ50qkJ0LFk1D1zzMBv6SgxSzOe63FKUjHUI; 4:nU12RvMomOsW0YRCM7nXNC2cQI6ct3rRyp34lDhCkVXy/mgq4ud1r37c8iOG2RixAU8wC1lhQMeC+CqVDkkf4G8zvG9LIecquMghZTKa1JryshZnasvexzzHXf/JAyr3jqnlF2giJ0Z+FC+oPBgP14+tpREQwx99G/tmnBGjEER4Oebu9sTYxhNdVcQXmDgiN195cx92qgtXMJ2ke5VCOl1PONKEWbAWYZ5IHAttnzeuEl3C/8MYou4GLjLazvQNrzGNYObn2gFY2OfKABJreBZd9AAVUaxJS2WLj+fX67kVT/MNDiMbU18cmmb4NDuF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231023)(944501075)(6055026)(6041268)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR12MB1506; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR12MB1506; X-Forefront-PRVS: 05437568AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(366004)(396003)(39860400002)(376002)(199004)(189003)(105586002)(4326008)(53936002)(36756003)(68736007)(50226002)(7696005)(8676002)(51416003)(52116002)(25786009)(3846002)(106356001)(8936002)(2906002)(53416004)(6116002)(81156014)(2361001)(6486002)(81166006)(47776003)(97736004)(16586007)(316002)(66066001)(305945005)(48376002)(2351001)(478600001)(7736002)(16526018)(6916009)(2950100002)(86362001)(76176011)(50466002)(386003)(5660300001)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1506; H:wallaby-smavila.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1506; 23:QLwAuOW+L5xDZVGxCDtaMrrVWC5UA7JQgtu9KGO2t?= =?us-ascii?Q?8IoKM+8EFKo7gR6Goz4MVeGuy5k4gLJwkL+crkx2Ji3i4cN+eOTPIuiAeCq6?= =?us-ascii?Q?iOO/x95R5ngfwpB+jfmYng6YjJE/Ht2D/85nMz20da7WDwFe+vhY9kbSjzGU?= =?us-ascii?Q?BGEVACrkob4Onha340XQBpGb0CL60QLfLvBQT5p1vPABzz8c8gn+GnN3pbHe?= =?us-ascii?Q?xFzVDdJUPrCqfJtt6B3Y5FaI04OpcaC/DhwnPpjSGoqNdv4PM5RMiFJVFFIy?= =?us-ascii?Q?6zk9yrmaIoZmzI5P39U6c44589CiHRaNafr4KV95mhifVS7avAD8+ePkYhc+?= =?us-ascii?Q?g+e0ux5RY1ezCTfei4ruBBCja8/UpJTvzEY9bIx09v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D06dNsbLsDk3DeD12faA4eknkHSxfI8yeUCH03JIYeQYgB65rjp+hG7ZiP/j8Y6+3L6L+DSOG7vhDB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2018 09:53:10.6370 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5eaa19f2-8c8c-40c3-6752-08d5542221ed X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1506 Subject: [dpdk-dev] [PATCH v2 13/16] net/axgbe: add configure flow control while link adjustment 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: , X-List-Received-Date: Fri, 05 Jan 2018 09:53:14 -0000 Signed-off-by: Ravi Kumar --- drivers/net/axgbe/axgbe_mdio.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c index 753dde9..07f4087 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -796,6 +796,19 @@ static void axgbe_an_init(struct axgbe_port *pdata) static void axgbe_phy_adjust_link(struct axgbe_port *pdata) { if (pdata->phy.link) { + /* Flow control support */ + pdata->pause_autoneg = pdata->phy.pause_autoneg; + + if (pdata->tx_pause != (unsigned int)pdata->phy.tx_pause) { + pdata->hw_if.config_tx_flow_control(pdata); + pdata->tx_pause = pdata->phy.tx_pause; + } + + if (pdata->rx_pause != (unsigned int)pdata->phy.rx_pause) { + pdata->hw_if.config_rx_flow_control(pdata); + pdata->rx_pause = pdata->phy.rx_pause; + } + /* Speed support */ if (pdata->phy_speed != pdata->phy.speed) pdata->phy_speed = pdata->phy.speed; -- 2.7.4