From 23aa3f21f5beae3e7a6c60146f5f3936e9c1918a Mon Sep 17 00:00:00 2001 From: Yonglong Liu Date: Fri, 26 Jul 2019 15:42:08 +0800 Subject: [PATCH] net: hns3: fix default value of advertised pause frame use driver inclusion category: bugfix bugzilla: NA CVE: NA Supported flag is Pause and Asym Pause, but default advertising should be rx on, tx on, so need clear Asym Pause in advertising flag. Feature or Bugfix:Bugfix Signed-off-by: Yonglong Liu Reviewed-by: linyunsheng Reviewed-by: Yang Yingliang Signed-off-by: Yang Yingliang --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c index fa86bfc05c05..e39d5ccf4658 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c @@ -235,6 +235,12 @@ int hclge_mac_connect_phy(struct hnae3_handle *handle) phydev->supported &= *hdev->hw.mac.supported; phydev->advertising = phydev->supported; + + /* supported flag is Pause and Asym Pause, but default advertising + * should be rx on, tx on, so need clear Asym Pause in advertising + * flag + */ + phydev->advertising &= ~ADVERTISED_Asym_Pause; #endif return 0; } -- GitLab