aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
diff options
context:
space:
mode:
authorPeng Li <lipeng321@huawei.com>2017-12-22 12:21:52 +0800
committerDavid S. Miller <davem@davemloft.net>2017-12-27 10:41:54 -0500
commit1770a7a3aeb23c0a1232486c8c4f50964725de46 (patch)
treeaf71e21ba9fdbce50a5437d24b979aae72d48e2a /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
parentnet: hns3: add support for set_pauseparam (diff)
downloadlinux-dev-1770a7a3aeb23c0a1232486c8c4f50964725de46.tar.xz
linux-dev-1770a7a3aeb23c0a1232486c8c4f50964725de46.zip
net: hns3: add support to update flow control settings after autoneg
When auto-negotiation is enabled, the MAC flow control settings is based on the flow control negotiation result. And it should be configured after a valid link has been established. This patch adds support to update flow control settings after auto-negotiation has completed. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
index 7069e9408d7d..3745153ed55f 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
@@ -183,6 +183,10 @@ static void hclge_mac_adjust_link(struct net_device *netdev)
ret = hclge_cfg_mac_speed_dup(hdev, speed, duplex);
if (ret)
netdev_err(netdev, "failed to adjust link.\n");
+
+ ret = hclge_cfg_flowctrl(hdev);
+ if (ret)
+ netdev_err(netdev, "failed to configure flow control.\n");
}
int hclge_mac_start_phy(struct hclge_dev *hdev)