bnx2x: Prevent "timeout waiting for state X"
Current driver release rtnl lock in between DCB re-configuration. As a result, other flows (e.g., mtu config) may enter in between and fail due to halted tx path for dcb configuration. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ffa1cb967f
commit
6ffa39f2f5
|
@ -1376,7 +1376,6 @@ enum {
|
|||
BNX2X_SP_RTNL_RX_MODE,
|
||||
BNX2X_SP_RTNL_HYPERVISOR_VLAN,
|
||||
BNX2X_SP_RTNL_TX_STOP,
|
||||
BNX2X_SP_RTNL_TX_RESUME,
|
||||
};
|
||||
|
||||
struct bnx2x_prev_path_list {
|
||||
|
|
|
@ -778,11 +778,6 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
|
|||
|
||||
/* ets may affect cmng configuration: reinit it in hw */
|
||||
bnx2x_set_local_cmng(bp);
|
||||
|
||||
set_bit(BNX2X_SP_RTNL_TX_RESUME, &bp->sp_rtnl_state);
|
||||
|
||||
schedule_delayed_work(&bp->sp_rtnl_task, 0);
|
||||
|
||||
return;
|
||||
case BNX2X_DCBX_STATE_TX_RELEASED:
|
||||
DP(BNX2X_MSG_DCB, "BNX2X_DCBX_STATE_TX_RELEASED\n");
|
||||
|
|
|
@ -5235,18 +5235,18 @@ static void bnx2x_eq_int(struct bnx2x *bp)
|
|||
|
||||
case EVENT_RING_OPCODE_STOP_TRAFFIC:
|
||||
DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got STOP TRAFFIC\n");
|
||||
bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_PAUSED);
|
||||
if (f_obj->complete_cmd(bp, f_obj,
|
||||
BNX2X_F_CMD_TX_STOP))
|
||||
break;
|
||||
bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_PAUSED);
|
||||
goto next_spqe;
|
||||
|
||||
case EVENT_RING_OPCODE_START_TRAFFIC:
|
||||
DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got START TRAFFIC\n");
|
||||
bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_RELEASED);
|
||||
if (f_obj->complete_cmd(bp, f_obj,
|
||||
BNX2X_F_CMD_TX_START))
|
||||
break;
|
||||
bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_RELEASED);
|
||||
goto next_spqe;
|
||||
|
||||
case EVENT_RING_OPCODE_FUNCTION_UPDATE:
|
||||
|
@ -9714,11 +9714,10 @@ sp_rtnl_not_reset:
|
|||
&bp->sp_rtnl_state))
|
||||
bnx2x_pf_set_vfs_vlan(bp);
|
||||
|
||||
if (test_and_clear_bit(BNX2X_SP_RTNL_TX_STOP, &bp->sp_rtnl_state))
|
||||
if (test_and_clear_bit(BNX2X_SP_RTNL_TX_STOP, &bp->sp_rtnl_state)) {
|
||||
bnx2x_dcbx_stop_hw_tx(bp);
|
||||
|
||||
if (test_and_clear_bit(BNX2X_SP_RTNL_TX_RESUME, &bp->sp_rtnl_state))
|
||||
bnx2x_dcbx_resume_hw_tx(bp);
|
||||
}
|
||||
|
||||
/* work which needs rtnl lock not-taken (as it takes the lock itself and
|
||||
* can be called from other contexts as well)
|
||||
|
|
Loading…
Reference in a new issue