Skip to contentSkip to conversation

net/bnxt: fix setting the auto link speed mask

PATCH In review Ajit Khaparde 2 participants 2 messages Feb 8, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix setting the auto link speed mask

Set the auto link speed only when force speed is not desired.

Fixes fe017534dfd4 ("net/bnxt: fix link speed setting with autoneg off")
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bnxt/bnxt_hwrm.c +2 -1
index 4dcdf36a5..b7843afe6 100644
@@ -831,7 +831,8 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ALL_SPEEDS;
 		}
 		/* AutoNeg - Advertise speeds specified. */
-		if (conf->auto_link_speed_mask) {
+		if (conf->auto_link_speed_mask &&
+		    !(conf->phy_flags & HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE)) {
 			req.auto_mode =
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK;
 			req.auto_link_speed_mask =
Signature · 1 line
2.14.3 (Apple Git-98)
#1 lore raw
Quoted 4 lines · Ajit Khaparde

Set the auto link speed only when force speed is not desired.

Fixes fe017534dfd4 ("net/bnxt: fix link speed setting with autoneg off")

Squashed into relevant commit in next-net, thanks.