From: Huisong Li <[email protected]>
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: [email protected]
Signed-off-by: Huisong Li <[email protected]>
Signed-off-by: Dongdong Liu <[email protected]>
---
drivers/net/hns3/hns3_ethdev.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d97280e647..8f819d5f23 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -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;
}
--
2.22.0