From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0042.outbound.protection.outlook.com [104.47.32.42]) by dpdk.org (Postfix) with ESMTP id 29DE31CFCC for ; Fri, 6 Apr 2018 14:37:35 +0200 (CEST) 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=a8lcmLl/jGE0RLVuWF0Cmg05d/hMc3j2XKqHsz0umNo=; b=TjQ0h+l+Q7v/TGSd7N4/6RGx9LRkRxrVr1dfK6S7QpuAG2VvE5wmM9G6n7DrSkB4nEJ2cnFAeY3T7yXyotQn6FmrGPpadbY/oS846Apw4xV+SmHKmRUvTv3wBG3ImZSmvALwvQD71tdNz9WI3VBu1b/YZgphgVfeEc0EjBTuKao= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by CY4PR12MB1509.namprd12.prod.outlook.com (2603:10b6:910:8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Fri, 6 Apr 2018 12:37:31 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 6 Apr 2018 08:36:46 -0400 Message-Id: <1523018211-65765-13-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523018211-65765-1-git-send-email-Ravi1.kumar@amd.com> References: <1522910389-35530-1-git-send-email-Ravi1.kumar@amd.com> <1523018211-65765-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: MA1PR0101CA0013.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::23) To CY4PR12MB1509.namprd12.prod.outlook.com (2603:10b6:910:8::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5aa5def3-9882-48aa-11e6-08d59bbb2b15 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:CY4PR12MB1509; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1509; 3:whQviA33+1lO5j0R8jwrsV6cFzs0odwqucKS2OxI3tXNdFrAnsn21II90glO+QNIEbMn1/2VIkol8nRuIWcybMF1MJ3HytFmEdNpqy3JUGWXyFcf4ssn7s77zbmWefrq3L7A2C5y84zNpumlh2uLKTXKZHjf0pPInURuuFd4/QIjBs2kYRSbgjPviryWEnLTdw2dEIrj1RCMIUbkr5+Zy2gaQQMocHken9GycqbfSsKmSKJU3Pc5uLzwTxJOGkeb; 25:gLfHOw6eDudV6xWeSmzKFZHZJ6VWqj3W5diyDEaaHJ9aPKVi/KgPvQh/xTPiVNGbphvByouesngoQNnPNyf+jVl56p46L5+2q07ySQjhjZgJnVkqcQa5UAjLTix+kSKlAFU8dmTO9nssZ5L+OEGLJz/irriKmwBDaxA8z1J9oLtRvknMsc7XYFvslvzelC700Ozq0KycL75iXskyqaiVeiudeAz8PZZOUBkdfeEa/k3IhEZwwaN0sFUiXnIse5P0MTUarfJ+PWtOXeSHwmoFmMTpQOMNVNdRMHkb/UzmkLckLTtQcG2O9C53+QiuTpB5Bf6RRfrR0PkvABH4mFTysA==; 31:oQ0h1wBNMmKVCLy7MTPSgtO99TwSsr6Be5DdJ07L9ZiPmJGLzCj7EuextlBJ71srLWrFsxhIZOfTMsOARLkYCkBtYMWHQDzaAydNCK9EuxWbJ+hi9kjgYnEXVA5xDdVOAsGgcAZwBwmAL2mWH6SFnJWXApcLliOsnbIw4WTASEmD/m8ua2MpakxFutx3MIefTIJ12Zn8zQFuJ2Wzlzn1ShJV6XGHuhbG4bDOrYjGOXw= X-MS-TrafficTypeDiagnostic: CY4PR12MB1509: X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1509; 20:FO0Rlpw1hbJszK7Pvo4or8cVmBvHF9RQX1j2mWttNsiqg655lGT2JEIPx2Uo43OaV8u7K1pjpBMhwwDRtd1hR1qTeAU7pD9u0661GlHbbib5EVXYsqfh2V80wvgDOd+OQWS91ttQCnLQ9s3uTQqRFabrDpOIvQiPqWvST0eiBpePFTinXNZeXfmmxSec0CvPK1/Hvygx543OyIJ6qNKhMic6AQWsSan85Y70N6yE8bqP5iqqR1O7pc6jLux9sbgNmtrWTG9buv/lUJns0Qyx1OgcOSpyKLuZZUcwohKYg2Fj8AqhQ5qmyxNtq1UPzGQ9P075usjos8Wc25AMdgJjYYsIMJ07pqEl1idoUxWpROrITtKd0M/Iged1YBHS5TgQ59JzjQy+EwvGfBZYnygmsUMY71i7Jvtu8xcuFE6U+4L/sh7JkSdpM7t0a18mu8o1nlhcMMHKiurxse0i55XudxhkJ4srlC8W/AyGqoXtTTfz6dMVg+mUmyglYhTR3KE2; 4:51/UouhaVO9ReOZftiDFEIRr5Eud4kmC92w7O8YFpR9h+NSbL5DabD9JbS9lzJu5fgvJ3X1et+NFbt/Y0IPI/LgHKYchiedz1vFP1/ZqgRLrtl/qkFu/Qzi6arooJRKClLN2QU1Qtj8B1/AEP5W/fRZAHr9LZcvgtxKSLFOP2R2y1AhgdS9j1AjuGglRgcjSrSOMeu4CqDD+Dg7X7r7HvlVj7miGSAV45qALdMUKWXN2hJ06iGlUsWYQ0Ve3oX0MpT71/KnXt9Ojdugj3a7ZBy+/+FHtf892h58ta/E+b69nV7lRFeGDZGl5Hi+nGUGg 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)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(6055026)(6041310)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR12MB1509; BCL:0; PCL:0; RULEID:; SRVR:CY4PR12MB1509; X-Forefront-PRVS: 0634F37BFF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39380400002)(39860400002)(346002)(366004)(376002)(199004)(189003)(48376002)(72206003)(7696005)(105586002)(478600001)(6116002)(50466002)(3846002)(446003)(486006)(53936002)(11346002)(68736007)(2906002)(2616005)(51416003)(386003)(16526019)(186003)(26005)(76176011)(956004)(50226002)(16586007)(476003)(316002)(97736004)(305945005)(2351001)(2361001)(25786009)(7736002)(36756003)(5660300001)(52116002)(8676002)(6916009)(6666003)(47776003)(4326008)(6486002)(86362001)(53416004)(8936002)(66066001)(81166006)(81156014)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1509; H:wallaby-smavila.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR12MB1509; 23:huFwHJ/QYvCBVHIneNBejdiqSvxNX3X1moXYOq9r1?= =?us-ascii?Q?m3K76mEiU7SE8k9zET6n7CJP5+RMxgnIcr61tkwmrd9kEcTUjjKcAgF+oh73?= =?us-ascii?Q?E2huL0mwg9iIwCN/soN7VQiufm1y4YnQ5r5BXLLOA+/F428G8oZNctGTd3Ga?= =?us-ascii?Q?08ihqtw8kNFJWWw35Xlao+zoAPXzVnAjuDvkQcgKDhKs8Ux5enWRN+0+hicF?= =?us-ascii?Q?uWKqjOP4kQ0ZLOwc+zLkVXJyv8iRewdlnNHfwXAaVdjnEtmGsIcGG4lJTy3H?= =?us-ascii?Q?cbRuFnQo4bWgQtbkBq6Ca8cDnjSrNKFs9riZlVzAUijmIl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BGQAIr/mjzXTIT9TPpnaTkbyO3pXRJHfpj0aZ3DJw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1509; 7:+PKy6XyfYjLc0DW9P7PtycBZA09Q84zrtnkUAtVXQsG0e9h2WyOTUf5kj74BlOa6b/++htCZyN22d0Sly6byPcQiDi67ywEE94AKr3O0iQHs4Ps5/aURs55e6shoz8Da2lOYKAYpI8PkGfH+aC3oXLATC4RnSvLC8RTWOQnR0YGTkW0SgynEvm/L7PsJY+cFpYOu1fZmyfaF5g6Po4wu6n+DiChT60S+2hhKONzrTOu9+zD2KADUDPsexbMGqkhX; 20:9AI1GAlY62yHq+AohMQu+OUgMMnBaDyVRQUy5J/ysPkTzRlEV7WdgJSoZTJFkzCi0B22TKaPb/Gi7Tw+sAP5SxKKEFOuDlgWHP1Ok17cFSTmfaYKTySqolZ1Mp9DBx3z5zz51IPPIi0qSDJEG44GjB8hYiaFqVU5asIuIWWFx9Gnzv2mWYYyuuWxJEV4hSVCOeFjlseHzDXOSi4or7JysYfU9XiBjtYFSih0BQLDA2bcLNYIDJiCHIyW2h6utxN6 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2018 12:37:31.7096 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5aa5def3-9882-48aa-11e6-08d59bbb2b15 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1509 Subject: [dpdk-dev] [PATCH v5 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, 06 Apr 2018 12:37:35 -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 914f34f..2296de7 100644 --- a/drivers/net/axgbe/axgbe_mdio.c +++ b/drivers/net/axgbe/axgbe_mdio.c @@ -674,6 +674,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