Commit 6d0ec65c authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller

net: hns3: Fix for mac pause not disable in pfc mode

When pfc pause mode is enable, the mac pause mode need to be
disabled, otherwise the pfc pause packet will not be sent when
congestion happens.

This patch fixes by disabling the mac pause when pfc pause is
enabled.

Fixes: 84844054 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a75a8efa
...@@ -1223,6 +1223,10 @@ static int hclge_mac_pause_setup_hw(struct hclge_dev *hdev) ...@@ -1223,6 +1223,10 @@ static int hclge_mac_pause_setup_hw(struct hclge_dev *hdev)
tx_en = true; tx_en = true;
rx_en = true; rx_en = true;
break; break;
case HCLGE_FC_PFC:
tx_en = false;
rx_en = false;
break;
default: default:
tx_en = true; tx_en = true;
rx_en = true; rx_en = true;
...@@ -1240,8 +1244,9 @@ int hclge_pause_setup_hw(struct hclge_dev *hdev) ...@@ -1240,8 +1244,9 @@ int hclge_pause_setup_hw(struct hclge_dev *hdev)
if (ret) if (ret)
return ret; return ret;
if (hdev->tm_info.fc_mode != HCLGE_FC_PFC) ret = hclge_mac_pause_setup_hw(hdev);
return hclge_mac_pause_setup_hw(hdev); if (ret)
return ret;
/* Only DCB-supported dev supports qset back pressure and pfc cmd */ /* Only DCB-supported dev supports qset back pressure and pfc cmd */
if (!hnae3_dev_dcb_supported(hdev)) if (!hnae3_dev_dcb_supported(hdev))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment