From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0054.outbound.protection.outlook.com [104.47.36.54]) by dpdk.org (Postfix) with ESMTP id 110771C94E for ; Thu, 5 Apr 2018 08:40:31 +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=UoXAU7z8Wt/SZP5aGFnnRVvXmoDRhH/S6VRaqoGWXO/OTweTGLEpSJZ6GiHSFGsL6onVMranTjRTtxnPIJSBN00EHt9xGhj+9979fMOx9XYv3W3DaSfX1n3dhg/8di5B6holPfXYBs/EZQ6jbMtrjD3Pf+luLAnOtDgNXoWhrNM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by BN6PR12MB1505.namprd12.prod.outlook.com (2603:10b6:405:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Thu, 5 Apr 2018 06:40:29 +0000 From: Ravi Kumar To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Thu, 5 Apr 2018 02:39:45 -0400 Message-Id: <1522910389-35530-13-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522910389-35530-1-git-send-email-Ravi1.kumar@amd.com> References: <1520584954-130575-1-git-send-email-Ravi1.kumar@amd.com> <1522910389-35530-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: BMXPR01CA0040.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::26) To BN6PR12MB1505.namprd12.prod.outlook.com (2603:10b6:405:11::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 76b2e8e0-4612-484e-d569-08d59ac01fc4 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN6PR12MB1505; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 3:4lleei8YjLyWMXP9NDfJvytScQU7eAmxOpcJwkISaONR/DJNQrpV4+J3AnZ07UwqcCUfdWYHrG1UB7u9kX2gLePYhufwK1Wgxm2cUCrG4v3KHFRjHmOfVJFR5RktJA865D6vaX/rNu47/1nufDbBPAM8hMpdYCQ+He4EBY+mgqHdkjZwBD8gg9V99Nu69q2RreenhgegRqoxBDcbFXZiRggsSMb144n8WA3ACdRsxqvVnFeCZHIytoKBylNx1OUp; 25:qINhhfDXuTiMcRiJer5EXUuPMn1wLwE6xYs2Sh7jEfuDsGfydCATemX7xcSGYZxI1FThKYjyrRUgnHbvwoIhR4VEPdggIRneERUWG4mRNmxFxgq9K0IJpzMfwq0416gaSy9lhxWdYOfm2Kbe7IzkDYnsUZKC8nBdqvjQrSZdBQenAHjO2XkX3DiYqIwLm6Y+lLSvYRTrkJqtsPaFiAAA5kgRQlwc5230puBHNv+jvhEyLrL3MXH6kE2klYFp37xLKOyOlizdlmsfAjVX+mkU8qt5HjVB2CrxoJmBeLqDbBaUBAK+Aey5x+A5LsIDN1/PToiL1K232EzGQC71fKwaiQ==; 31:ySGQ9HPkN4v8Img1j8ggfTsJ9NQnI6UFPf125empaA/0NQQviUqoN2t/9Bw9+rflyJpsC1rWZ/zgyLdq3J8Yy3wONQn8vOGOGQsdR9n2IRONnYa/28dhAw0ETFENIL8ARMGByGwsmD4mit8B7sbvWQvjvygbazccAEIQt3TTuyGEJjFjmR45b6oFNYDBJWo0rZRqhRRE4ccwm7rMcN1W2zmflYY+zc/NykavzJGx23Q= X-MS-TrafficTypeDiagnostic: BN6PR12MB1505: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 20:4wnkfP9w2z5X/c5udiW7UOabnE85dZ54JD0+O/wVnOEsH39chJ+mY1pk7raoVY1E/VLOiW9FR1r/D9oH+WMbngAqhPFNepgn7MZuA8SG4YOphv6ErAqhWahtPxszvZEO5zRL4Cb3pcTqwMRLi6XZohT9K9NBJHCdkE8QfrHTABA1JfeWTAZGEBGPKliiDAZSotEYZOc8ivIqFw9b1NBg94EosoAKTPr5EsNLGRbbw4VB7PN9Wnp2oJWFhKrl0Ayp5nwiJY0eKMOo7u2UU+k5Ie3WLNPCVu8BRda9fys013m2/BJcj0iJmzs3Ddg/ZXr6oiQKukaHL431wsvjzg0C5ENB2mDliTVUR8N6x/w3oZiMw3R22NHDzj8MJBIfQNeYB/iTJbiZ2HrhfN7OWTyd8Y5XXdvbhyetjy6EK/enw9pXvmDmQGp4ZuUn3CTEL4ngO7UFJieRoRx7qrfR1dKqkVpGIbrlOYZ50ukfcP/SkMgbW3/vTx70TcVuqQoGcuTk; 4:h/SE7WPm8zWTejEZyGeuhc2ETCgDQETcb1ztDHmFwL9fTognxGELrgqWHIfDjTDaDlk5VTjyqeTzYehwqF4/aK7LavLhxCSeYNWT+EwcmsFfgk0EEVuQ3lWixQsCBQIcxTZc099JfiMMV0MtdcdCd/SkMT/iEa8Y0V5VtMOAC6u3aG9PqvVGHuL+z9tVb5QiOshCYaDKBVTZR25NlNHcqHtX2AFUcMhOt9uhc/unm2lkwONgdefcs8cTgjoHf24h+Hi5VaSCkgRPyNoZ43RwgrVblD7KpfqcrWPYBA0nkkGFTq7fza2FZVsVdTPVIPBj 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)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BN6PR12MB1505; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1505; X-Forefront-PRVS: 06339BAE63 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(396003)(39860400002)(39380400002)(199004)(189003)(3846002)(476003)(2616005)(316002)(446003)(956004)(305945005)(7736002)(478600001)(16586007)(16526019)(6486002)(186003)(76176011)(5660300001)(97736004)(2906002)(6116002)(486006)(386003)(26005)(50466002)(11346002)(25786009)(8936002)(86362001)(50226002)(66066001)(47776003)(48376002)(2351001)(6666003)(2361001)(6916009)(4326008)(81166006)(36756003)(53416004)(51416003)(68736007)(7696005)(8676002)(106356001)(105586002)(52116002)(81156014)(53936002)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1505; 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; BN6PR12MB1505; 23:yx1PfNOTEnoCcRbHF31VNp5cA2w9O1MTWCoGJN3Sz?= =?us-ascii?Q?cQHOT4dsW1L/oWQkQkQzNYYcMZ+KaF3RTs/e5W3LF3rwdG17ynRB4WtuifqH?= =?us-ascii?Q?rZO/ba3Mq7b5aJMMQc7GiI4b/SfwuIUznSLMJFRRH80hBGE0b6W3R9OyU3ur?= =?us-ascii?Q?SZ6EiEJWhJDlx51HsT2RdrsuRk3tMpfVHNsRBL/FFSPH+X3cYteoEci7KEYc?= =?us-ascii?Q?pVtQBU2bjGjRG9X7CTnbcrpQpwyAC+gsV/uQlnxF9Z67Dij5oZpjHb6dC7f7?= =?us-ascii?Q?1Q1JzOmRsHK3ZKZ8lTo9yrrHoYolyZgNDXE3jCftHlY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27c5GZqH/9x0dgHYBRPvD9DH/qDNuh1FsqeEd0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1505; 7:frJbU/LZ2HMZhWf4VJrrpRcns6lAWQ9KzFIjeMGkaHYfxlkQuY/O8WoHH5MKSEceb2Z+EUQ3EDfw7l8mApxFYHZD6YLQpuDKPSECjU+Il7oSre8tWOGo7K8XT9hTZkFcMRg3STvzuJDcfqaBmRkn37iAEDPVpCfpTVmp6z/xT5pRCUB5vvVl+G9hwY+q/m6ogrCj+RLJDTz9jJqMj8DO646iHUJrY2BSyw0F4JGRdhp/lwxWcPJB2OqB1G8GWtJ6; 20:n8QT8caf6dOh2IG9F4rHMYscA9EVQ0hhMJCL2+ywNsW6MGw9pKqhGFruSrieDrkvKwANS0OF7ANQ8XaPyGq+cZjSL9cHDy0nL3DsDcWmIABTvizx2TUe2DhPlECsoeYVqZ5kjbrEP4uohTigZrYRLkCibA2w0Ktff+rSYBR2hq8Qh5xh5Wjyy+8Z9KL1PT92F4NfwJKuuC44/zoHMl8Vpo4+MI5TxZvDtJcn3ZNN2BFiJ/bBwkU4vjB/Ev0tccRF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2018 06:40:29.1057 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76b2e8e0-4612-484e-d569-08d59ac01fc4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1505 Subject: [dpdk-dev] [PATCH v4 13/17] 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: Thu, 05 Apr 2018 06:40:31 -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