Commit 6ffa39f2 authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller

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: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffa1cb96
...@@ -1376,7 +1376,6 @@ enum { ...@@ -1376,7 +1376,6 @@ enum {
BNX2X_SP_RTNL_RX_MODE, BNX2X_SP_RTNL_RX_MODE,
BNX2X_SP_RTNL_HYPERVISOR_VLAN, BNX2X_SP_RTNL_HYPERVISOR_VLAN,
BNX2X_SP_RTNL_TX_STOP, BNX2X_SP_RTNL_TX_STOP,
BNX2X_SP_RTNL_TX_RESUME,
}; };
struct bnx2x_prev_path_list { struct bnx2x_prev_path_list {
......
...@@ -778,11 +778,6 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) ...@@ -778,11 +778,6 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
/* ets may affect cmng configuration: reinit it in hw */ /* ets may affect cmng configuration: reinit it in hw */
bnx2x_set_local_cmng(bp); 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; return;
case BNX2X_DCBX_STATE_TX_RELEASED: case BNX2X_DCBX_STATE_TX_RELEASED:
DP(BNX2X_MSG_DCB, "BNX2X_DCBX_STATE_TX_RELEASED\n"); DP(BNX2X_MSG_DCB, "BNX2X_DCBX_STATE_TX_RELEASED\n");
......
...@@ -5235,18 +5235,18 @@ static void bnx2x_eq_int(struct bnx2x *bp) ...@@ -5235,18 +5235,18 @@ static void bnx2x_eq_int(struct bnx2x *bp)
case EVENT_RING_OPCODE_STOP_TRAFFIC: case EVENT_RING_OPCODE_STOP_TRAFFIC:
DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got STOP TRAFFIC\n"); 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, if (f_obj->complete_cmd(bp, f_obj,
BNX2X_F_CMD_TX_STOP)) BNX2X_F_CMD_TX_STOP))
break; break;
bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_PAUSED);
goto next_spqe; goto next_spqe;
case EVENT_RING_OPCODE_START_TRAFFIC: case EVENT_RING_OPCODE_START_TRAFFIC:
DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got START TRAFFIC\n"); 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, if (f_obj->complete_cmd(bp, f_obj,
BNX2X_F_CMD_TX_START)) BNX2X_F_CMD_TX_START))
break; break;
bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_RELEASED);
goto next_spqe; goto next_spqe;
case EVENT_RING_OPCODE_FUNCTION_UPDATE: case EVENT_RING_OPCODE_FUNCTION_UPDATE:
...@@ -9714,11 +9714,10 @@ static void bnx2x_sp_rtnl_task(struct work_struct *work) ...@@ -9714,11 +9714,10 @@ static void bnx2x_sp_rtnl_task(struct work_struct *work)
&bp->sp_rtnl_state)) &bp->sp_rtnl_state))
bnx2x_pf_set_vfs_vlan(bp); 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); 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); bnx2x_dcbx_resume_hw_tx(bp);
}
/* work which needs rtnl lock not-taken (as it takes the lock itself and /* work which needs rtnl lock not-taken (as it takes the lock itself and
* can be called from other contexts as well) * can be called from other contexts as well)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment