[v2,1/5] net/hns3: fix never set MAC flow control
Checks
Commit Message
From: Huisong Li <lihuisong@huawei.com>
When some hardware and firmware support speed auto-negotiation
but do not support flow control auto-negotiation, driver can
never successfully set MAC flow control by flow_ctrl_set() API.
So only tell user driver doesn't support flow control autoneg
when user enable it.
Fixes: 1f411e31a826 ("net/hns3: support flow control autoneg for copper port")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
drivers/net/hns3/hns3_ethdev.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
@@ -5304,16 +5304,7 @@ hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)
if (!pf->support_fc_autoneg) {
if (autoneg != 0) {
- hns3_err(hw, "unsupported fc auto-negotiation setting.");
- return -EOPNOTSUPP;
- }
-
- /*
- * Flow control auto-negotiation of the NIC is not supported,
- * but other auto-negotiation features may be supported.
- */
- if (autoneg != hw->mac.link_autoneg) {
- hns3_err(hw, "please use 'link_speeds' in struct rte_eth_conf to disable autoneg!");
+ hns3_err(hw, "unsupported fc auto-negotiation.");
return -EOPNOTSUPP;
}