From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0050.outbound.protection.outlook.com [104.47.42.50]) by dpdk.org (Postfix) with ESMTP id BDD667CFA for ; Thu, 30 Nov 2017 14:11:56 +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=1Xs5c8t+XqaSp9Sfn1kc1b6dl8HtKEQCIYQ4XgDAemLdzCFhP2DclqsGLdqPhAzzVYxlQ8tvoVR/eEfXmDGGll8e4w4S33D/SCURYuynO6dG7FrLDTR6BU4AZH3kHFOHbXjOIlRg9FlXIUsWio6V1sY+pxilWY/T2rr2BsBuj9A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ravi1.Kumar@amd.com; Received: from wallaby-smavila.amd.com (202.56.249.162) by DM5PR12MB1514.namprd12.prod.outlook.com (10.172.39.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Thu, 30 Nov 2017 13:11:54 +0000 From: Ravi Kumar To: dev@dpdk.org Date: Thu, 30 Nov 2017 08:11:07 -0500 Message-Id: <1512047472-118050-11-git-send-email-Ravi1.kumar@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512047472-118050-1-git-send-email-Ravi1.kumar@amd.com> References: <1512047472-118050-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: MA1PR01CA0077.INDPRD01.PROD.OUTLOOK.COM (10.174.56.17) To DM5PR12MB1514.namprd12.prod.outlook.com (10.172.39.146) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30ff563f-e253-406e-2ea4-08d537f3edd0 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603286); SRVR:DM5PR12MB1514; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1514; 3:cCQiCYoGNVRsTLosuYqzykzE19jny630dsyvgWoH97izRMSPBVipl17vFLgEnBtC+MFYMZ3gB35Qz6AVJV8ktJLRho/ASu7pxoHEOqud8+Gk/RjY2DTLfEzWX+RAIy1Hkkf/IitWotJv6b98s8Qe1q121nkxOHZ9PkFDcU6XnmYjGRCv2CB24bw1tBQFVvsd1l4iuSAwoG87zN26Gdqv+khRvghhVKT/7SuE/737upkkvjMJOjmv53uAZUVFQ+OI; 25:4NkpoqMwHVRg3yWYAMMGTzDD6q3mr3KpPv2g1rGqVRUbXFTNFKPba0nN8960NFLXo9Es1bG1UdmRHe3inxAc1cfDskYU/X6NqOErwdOFLL9vLr/Lbjj5+bpzdHqQJ+ry/hXVloQmukSa8VR/YqVNeimeLG/zW7XuWXjzd8I/pA24eov7PQgk8SP3SOPkPxl1sfdBIqJ9bmDCMMH3gMgLLNf9p7Xr24wUdLq7pDup4D+X6V82/x+MrDsL4h9WUkew/gYSf4QsZCdQ/ZERbEO7mkFcUp1Wu3s7EzjFB9aXygGMcDbfejffl+nMPOfLNKJroAxLBeoCkBty45DCr8TVmw==; 31:tBvV9aXiFwNpkgwIUJQEoRoMThkKinHliQsDFHhTSttzotBKwAIC4zitjUmQk4lUyXraJ2HbKNtGkJBfxQrpdpSloxvZiMljrO3IPjl1RFkWniIhzHd3KepMDmNAgj9lCiCuvnkN27e+d+zjAfo7skTV4BBlRX6kkx8h48uBuk+wvpxbrh8ZwMogOLP4X9XY11MrsjAZEiClOkSzFjFsP29Qfr0GACetvcKtYY31w2A= X-MS-TrafficTypeDiagnostic: DM5PR12MB1514: X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1514; 20:hcH6Q216ZniFeCgH5Mgk8Fk8tNXDNrZu73SUUrvLouJGP3bMF3novH9SA5KE3ALsJM2PzBYG5FjeWDqEfYyQnrJUptYs7cX5D23Hl0m4sCJeYHPLVe3fwaVJa4mrVzwhaetpHXuk/US8msuotUlvgqAWDCUQYMPysgXgJh9fHh2dXleBxxZoWppPRnweM06vyFOk8MFySljU0es3By7niK4PXuVFOxkPtsgM6B9Yr95U+MQo5whTNZDvYe/JqYmfMG3o0FfC+yq1J+ftVZwM55vH68i6jBEt6WDZAq89dqRVm9/2/CMO/4Dw0thLEQKcPvSoe2tjeXNfzjCDlnYLvjiakgBzDXA1V5q8VDwnsFGnBJkNpYz21RnqnQxMMP37iRkT5el2XagtatyXGf3UM6BvPCTKA4hVSnz19r99TlhgUNZRgnhF+kCEdjQ4gjWapnboEofzxJrirFN88+BDUJUI9xAZjjWDSEmZzbmiwigAruyvuw6OYwNc2axSnFJG; 4:TZbOkjbvBi3Zv4qRtIukb1J9/L6dPBqQ9EDxcMTvpAbA4DN/m1lN09M9cj7DQuxPG2c26kw1trMS1mipZMiJjNei2nVStdvgJJTXJeBoI5W8h96TzV4C+mXkEwJ+xE61KDi4l0oYMCvwvxyxKyb6z0ktKJs+NTzloPv3N9YTQLTxRvjHJEnrqeauBHahkxY94WuqtRpGfLMW2TrNl9WoHSc6reWT6zcOoEC0zvH/g3IDLOcqBGnJUsdvIuGj0cEEad7iGd2vT4KNmpdRps8u6fEQcrhTSHM3DHIckki0sbBCh0o87X1zDO+xlBiUgPv9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231022)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011); SRVR:DM5PR12MB1514; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR12MB1514; X-Forefront-PRVS: 05079D8470 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(366004)(346002)(39860400002)(376002)(199003)(189002)(48376002)(16586007)(6666003)(68736007)(86362001)(316002)(101416001)(2906002)(50466002)(8676002)(51416003)(6486002)(72206003)(50226002)(16526018)(50986010)(76176010)(53416004)(189998001)(7696005)(52116002)(97736004)(53936002)(6916009)(2351001)(2950100002)(105586002)(66066001)(106356001)(3846002)(25786009)(2361001)(81156014)(5660300001)(36756003)(6116002)(47776003)(305945005)(478600001)(8936002)(7736002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1514; 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; DM5PR12MB1514; 23:P21dAhanLJLXYKs8aUDmGpdjHlGUnDhlIstlm7LyA?= =?us-ascii?Q?iyFmOC2FxendXGOm8GL896x5bUqvi1UaxIUWp57cxZYHIeuL9CGJJGx59xD3?= =?us-ascii?Q?FEFkR/1Xkx1T6CUncvbOiPviT8Fz+fvt1VZcnrs5cxcoXhOppxpCe8UaQa47?= =?us-ascii?Q?uqXjiMU/5hkp5te72fH1tQHxhVBdC1dV2/Z8wk6ZYwxeeV4GtH5c13kcQSIO?= =?us-ascii?Q?USE85Qf0svq8jVIUN0eYweXdUtveNjzr27baNyjjKPiIQHraE3oazkWMKtlL?= =?us-ascii?Q?MaUBsk/c/iHVN4NpVgc/EP28R4AddGKfMf6lcTDMk1DwPagzgd4YNWUQIGZ8?= =?us-ascii?Q?axc0YkrWYM7KRGQ4JJ35AiPH5scu5QRMo4VceDdosddh8KROs+voi+CXQOe9?= =?us-ascii?Q?v9gwD3qS2KivPepJGJJW4o/7gWsmizvOe/hH3qEfSJ2Cvdu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y3EyjS24p8Y9EYRvKwINzT3BlMNlU+b8Ul3+1DsO3z4O1M0Pflzbsbiqe4nYjs7nFCFkFZYZLVv6YyCp1tLazr+Y6oh4dRzzMQf59TF5UMdU3hUmbnDChNA8+/QoVudGAc63/IOUYL1BARAGlGc3xg4rlQDr/3EcXeccpwoKEkVJfbSHuwuBDo6Ea+oGrKuA=; 5:UuzpIcruaBianUimMtgjMDyAzlWIhmnFRleyoHRYcTOTVAowdeILrifxPVyZ4p88HGt1wicpu5MPMsBF4PNdcgNflx9zoZWORIOi+DelTRT+NHgjuUUDMPGZp77qO2cA2U+H50rWUBVsvcxGlp/E6Sg0v2BEkhXYUeyyAaCSYfw=; 24:e1ywQoahjHuoIXqxAgXeyxpqqFgUWdNxddahBNuLncjnw1gBxxBBNy5+2rQ9p7cHzcTfpJMLPavgotd+yYYii2wxBuuHfQ0Z2FKBvN7tqbY=; 7:WtzLBUpGngWC/hanQw8EBsEKhhmqFQxahTh91q6hdnPdXfWRrTlZM6Y/oszV50m/iXPEP8PAQui/1KIeWjQ76lmp5my9IypEItnTdAEKPYf2V0wmMNRHLAanShdMe9GdpPNP0fGXvNd9J266qe3sZM8+n5H7PuBLsgGG6beW2TUOxhtTbK7T8u5uWmb1DnHhAZg+IzAIykDoyIjrwdrxVCBa3QILgIALQNHsXOHcWGdVw9u0FVY4sHg+kKJ0d94e SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1514; 20:b8AipBeW0TJupTOVMDHpykeYq2M2tQ7R0hxk/aIEmGD2f+kLmnTMw2sC54AMYBNVVmweHgMe+S8evroLcRux8LhloQMaClvR2NlfyylpJz+Skj1XmHp7xVrc4kHO+t9kNVOyeCXNECeypqqxA1nAfRB5DS+uszRG77C+yg+x0E8BZ992tQ6phKSry2WDXsDtHliZFjKOpoM1t0j6bjAQWYwFQcsl5jmwHBQoDIYmvPrRtqaUCZBgdrWrMAeI8auO X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 13:11:54.1404 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30ff563f-e253-406e-2ea4-08d537f3edd0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1514 Subject: [dpdk-dev] [PATCH 11/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: Thu, 30 Nov 2017 13:11:57 -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