cxgbe(4): Always initialize requested_speed to a valid value.
This fixes an avoidable EINVAL when the user tries to disable AN after the port is initialized but l1cfg doesn't have a valid speed to use. MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
bd868d67bc
commit
d57241d2e7
@ -3981,12 +3981,11 @@ init_l1cfg(struct port_info *pi)
|
||||
|
||||
ASSERT_SYNCHRONIZED_OP(sc);
|
||||
|
||||
lc->requested_speed = port_top_speed(pi); /* in Gbps */
|
||||
if (t4_autoneg != 0 && lc->supported & FW_PORT_CAP_ANEG) {
|
||||
lc->requested_aneg = AUTONEG_ENABLE;
|
||||
lc->requested_speed = 0;
|
||||
} else {
|
||||
lc->requested_aneg = AUTONEG_DISABLE;
|
||||
lc->requested_speed = port_top_speed(pi); /* in Gbps */
|
||||
}
|
||||
|
||||
lc->requested_fc = t4_pause_settings & (PAUSE_TX | PAUSE_RX);
|
||||
|
Loading…
x
Reference in New Issue
Block a user