From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0041.outbound.protection.outlook.com [104.47.34.41]) by dpdk.org (Postfix) with ESMTP id A07091AFED for ; Fri, 9 Mar 2018 09:43:22 +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=euFpSC/X+HKo9AzJ+4FoE1sPpoLLMjsLykUUTW9YL/dBieCN5AZNSlWmAvKYasyIIlFFWK7sY2jJwBA1MqbITbnaHp5Z5HSvuuXPx+5AoO3hQBhw294xsIzQnBCMGieUrxAFbd5S2jItArA8D+LWeYYOpfcsKKLSFK/QQF4/v1Y= Received: from wallaby-smavila.amd.com (202.56.249.162) by MWHPR12MB1517.namprd12.prod.outlook.com (2603:10b6:301:b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.12; Fri, 9 Mar 2018 08:43:20 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 9 Mar 2018 03:42:29 -0500 Message-Id: <1520584954-130575-13-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> References: <1515145938-97474-1-git-send-email-Ravi1.kumar@amd.com> <1520584954-130575-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: BM1PR0101CA0057.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::19) To MWHPR12MB1517.namprd12.prod.outlook.com (2603:10b6:301:b::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: b82c2cf6-60b3-4027-a206-08d58599d029 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:MWHPR12MB1517; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 3:RVsSqiZGuOfpLCeKy9ORziLNnWZsLT4LSxXUIoSy7Ig4pEFdJjwozoGrAVIeOBEnsOIZbqSL6KIGpUI58Lh6k+oqZPxpKd1LdlvKPsupResCYbz3oKsD0MdcyqMhnKY8jq1yzmzgX3JP7Ls3iPYSvL4MbMSJOzuodY0P9lfixDFM08nCzsBeEl8aBLHEOHfc6y7M1q6clHKgoWf+Y9cleJp32SnoIkwu+G1E77RRO2nxnYZBlMs5xxcF1sWlp4ER; 25:kEu5OKuPCrX0DvJRiT0o9Q5BQ0wfMbIEVrMP4YsOwwQnpjmy1obosqZa5IPuXDgSVhu59opzw2LfQmcpoho7vJ/LKO5ANqx9WZDXvN8iukF4h8I6bkNp3QMR+sXPFTwqua077D0kLunV55GLQBnjsFvxLZS7ys+9POFevfLfDkcmr54eJ9X2VtE6G0xO2pVM+B3vWgqktQz1G4p48B0tJeWbZsD2TNeC2lrHK1jx2hwMPbzD4iEqe+14fflHB9DYh3OtCh/hzBG6H/eBEzQcYks4UhU0d963dDdlzM/cLL2tPYA7iUPbLYEncf7e4+ShXIDds/7gRvjx70a4P0CbZg==; 31:JgnTOnvYLCfhN20/rUtwlSxnQGTKlVPcZLgWVZuOPqNDYnl7S0AegJq4MBacMJfuRgAC/Bt/YoWwIIsMPXZNoxZGnJrqrxMrLdMZ+8Btm6d0Zf7U7APcCVULuDRuxR8QrT84p6va2Yh5TmBoagqJfDDLsYXCWCtoVWvkjuiFazRUmOoJbmozU4Jh70XvIHNGx6kaXTR6mKF2wQmP9h1mKjregxKPotzGEqGri7PdsyA= X-MS-TrafficTypeDiagnostic: MWHPR12MB1517: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 20:Ve5M2RkLewJD8nt0iOdfnN9MHr7NFN2iGH8/o1EsQToVBmt9r/2rtqtDIuu+UVaFIMYNVjg38jK9o4cGzvbnrEfwr6HvGgfJ5YTRvHdDqS+2AaZ2x6k9lSgGKLy2M0PaT3X+xKZVsigR2RT558Tv2sVURgFKR5ieB9GGkC67nZ2xXfNkyQ8ygW5ZZObDFHGrslkTQcjBxJk8br4Px6ZxToJ/OHm6n5FaWMUBR99U/zI1IHBMEN6IF+PyvJLfjso7G1kWkzrS63Z5LPnfGHLvCp0MKwZciSbShdxk3dVNqXwiJb5f8n6yxiUmMoBlU1acUI6CKlMRqHutYRW6DurjJswiPzC60OgifBEOWWV2yjOxP1rdX0LNpash30q5Dew5XYj0mIGOWtMy2AboUeuH6AfQKAzXaGJE2gLZS4HBbeN1bqnrdQtMTQ6ErK2Xyxi/y8cEN6qg82HmuRp1j0GdkwAK9B3JZeK/DJkr9XPrC7z4PYwGj0sVmkJ11ASIGqGo; 4:I/B/2y99nVWdf7xfzQYTPcc3lun826vEp5GcJc3JixwMs8CVJbygbfXeazT/9BDPSM3ANliMpLKb2a5OyKWgLZKy8Xuc8X+X2cVchy7D/hT28FB3bff381GOOkLFEpke3vTPGHI/3b0Q1CBlofBnRh/Dbp+1b4D/lR+8molN6/GPeJMcIACYnMnyBkgDdfEaJ8Zqh/w60RjSTlNYC8JwqlhrjbwMVVmWiEyr7QPVRbASb0PnmjQXoIIHXqoZ8ktcIaKVAtTmiBPD6LzRbwWfFanwXM6fI3bXpam2/lZbWmtmtnHrFnsqU2V/z4wn5EFB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231220)(944501244)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(6072148)(201708071742011); SRVR:MWHPR12MB1517; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1517; X-Forefront-PRVS: 0606BBEB39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39380400002)(396003)(39860400002)(366004)(376002)(199004)(189003)(305945005)(50226002)(386003)(6346003)(26005)(36756003)(97736004)(25786009)(7736002)(50466002)(8936002)(4326008)(16586007)(86362001)(81156014)(81166006)(2950100002)(6916009)(16526019)(186003)(5660300001)(316002)(8676002)(76176011)(52116002)(51416003)(7696005)(53416004)(48376002)(478600001)(106356001)(6116002)(3846002)(68736007)(2351001)(2906002)(6486002)(66066001)(47776003)(105586002)(72206003)(53936002)(2361001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1517; 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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1517; 23:mUOdU5/PCmjz/+A9S1Nm7QjlgkxybMlWstcm1hq9k?= =?us-ascii?Q?O7oj+TfOgCuBYWcJAI7ZRAHGYVljp9vsS23f3xJ0HP/gKulCorCLdHU93OJe?= =?us-ascii?Q?0z12eOM7qlSe5JFIi+3Jaf1tLSYckX3ymKJNuIr+Wybl8a16jx//Alm+BXSR?= =?us-ascii?Q?N53RaU2N6kfCcL/HDAQ8nrV1Hd/ME/fhFqYCcc4mNPDWfgDJom1kOgFcgSp4?= =?us-ascii?Q?EXsWzuBmrynOWBajkyeW2hbcUon/uWX5WTVElBqb3W4VcQabk23R1mVXPb87?= =?us-ascii?Q?dr2+51YecUveCa7D9Iu3gH9nzPtjrOmS8i6WJUeeOWIRVAqTmtJlEi/k9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lFfMKQVaLzqvA8r5wE/0wYbho2f911uvlBQAoQv49ajwAVXIY SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1517; 20:Xoc4U6oPw3zWZ0nad7lrOIydn5EQGqNcuXuMYv3TBG2+u7lj4XTZ3LEI6/wtiQxQ/QCmN4Tjp4sH86bPQP5ajkm3oHckteDf1FOHx+equzd97Xe509fpryCKyQcic3CcMMiztg4LHEhfKIHxcJFxEmb67Vrd0zWnfiOA2NL684dLbuFSw4qNJXlMVJN1Dz3aZIxS7fBCRtYfaezuSKLa1c0Cc43H0URfPTfdYdfbYg6v57RxQHEBIjzjRr/9tFdn X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2018 08:43:20.1829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b82c2cf6-60b3-4027-a206-08d58599d029 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1517 Subject: [dpdk-dev] [PATCH v3 13/18] 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, 09 Mar 2018 08:43:23 -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