diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2013-11-17 01:59:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-18 15:45:44 -0500 |
commit | 6ffa39f2f59e4555239cc23a3488ad789b557166 (patch) | |
tree | a79003d656cd9b1692d0d78307b56c86ff01cce6 | |
parent | ffa1cb967f650b6ce5eace09ee9b1ae7c4015d18 (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 1 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 9 |
3 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 4e01c57d8c8d..a1f66e2c9a86 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -1376,7 +1376,6 @@ enum { | |||
1376 | BNX2X_SP_RTNL_RX_MODE, | 1376 | BNX2X_SP_RTNL_RX_MODE, |
1377 | BNX2X_SP_RTNL_HYPERVISOR_VLAN, | 1377 | BNX2X_SP_RTNL_HYPERVISOR_VLAN, |
1378 | BNX2X_SP_RTNL_TX_STOP, | 1378 | BNX2X_SP_RTNL_TX_STOP, |
1379 | BNX2X_SP_RTNL_TX_RESUME, | ||
1380 | }; | 1379 | }; |
1381 | 1380 | ||
1382 | struct bnx2x_prev_path_list { | 1381 | struct bnx2x_prev_path_list { |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c index fcf2761d8828..fdace204b054 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c | |||
@@ -778,11 +778,6 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) | |||
778 | 778 | ||
779 | /* ets may affect cmng configuration: reinit it in hw */ | 779 | /* ets may affect cmng configuration: reinit it in hw */ |
780 | bnx2x_set_local_cmng(bp); | 780 | bnx2x_set_local_cmng(bp); |
781 | |||
782 | set_bit(BNX2X_SP_RTNL_TX_RESUME, &bp->sp_rtnl_state); | ||
783 | |||
784 | schedule_delayed_work(&bp->sp_rtnl_task, 0); | ||
785 | |||
786 | return; | 781 | return; |
787 | case BNX2X_DCBX_STATE_TX_RELEASED: | 782 | case BNX2X_DCBX_STATE_TX_RELEASED: |
788 | DP(BNX2X_MSG_DCB, "BNX2X_DCBX_STATE_TX_RELEASED\n"); | 783 | DP(BNX2X_MSG_DCB, "BNX2X_DCBX_STATE_TX_RELEASED\n"); |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index a4c2dc295344..8eb6469813c5 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -5235,18 +5235,18 @@ static void bnx2x_eq_int(struct bnx2x *bp) | |||
5235 | 5235 | ||
5236 | case EVENT_RING_OPCODE_STOP_TRAFFIC: | 5236 | case EVENT_RING_OPCODE_STOP_TRAFFIC: |
5237 | DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got STOP TRAFFIC\n"); | 5237 | DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got STOP TRAFFIC\n"); |
5238 | bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_PAUSED); | ||
5238 | if (f_obj->complete_cmd(bp, f_obj, | 5239 | if (f_obj->complete_cmd(bp, f_obj, |
5239 | BNX2X_F_CMD_TX_STOP)) | 5240 | BNX2X_F_CMD_TX_STOP)) |
5240 | break; | 5241 | break; |
5241 | bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_PAUSED); | ||
5242 | goto next_spqe; | 5242 | goto next_spqe; |
5243 | 5243 | ||
5244 | case EVENT_RING_OPCODE_START_TRAFFIC: | 5244 | case EVENT_RING_OPCODE_START_TRAFFIC: |
5245 | DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got START TRAFFIC\n"); | 5245 | DP(BNX2X_MSG_SP | BNX2X_MSG_DCB, "got START TRAFFIC\n"); |
5246 | bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_RELEASED); | ||
5246 | if (f_obj->complete_cmd(bp, f_obj, | 5247 | if (f_obj->complete_cmd(bp, f_obj, |
5247 | BNX2X_F_CMD_TX_START)) | 5248 | BNX2X_F_CMD_TX_START)) |
5248 | break; | 5249 | break; |
5249 | bnx2x_dcbx_set_params(bp, BNX2X_DCBX_STATE_TX_RELEASED); | ||
5250 | goto next_spqe; | 5250 | goto next_spqe; |
5251 | 5251 | ||
5252 | case EVENT_RING_OPCODE_FUNCTION_UPDATE: | 5252 | case EVENT_RING_OPCODE_FUNCTION_UPDATE: |
@@ -9714,11 +9714,10 @@ sp_rtnl_not_reset: | |||
9714 | &bp->sp_rtnl_state)) | 9714 | &bp->sp_rtnl_state)) |
9715 | bnx2x_pf_set_vfs_vlan(bp); | 9715 | bnx2x_pf_set_vfs_vlan(bp); |
9716 | 9716 | ||
9717 | if (test_and_clear_bit(BNX2X_SP_RTNL_TX_STOP, &bp->sp_rtnl_state)) | 9717 | if (test_and_clear_bit(BNX2X_SP_RTNL_TX_STOP, &bp->sp_rtnl_state)) { |
9718 | bnx2x_dcbx_stop_hw_tx(bp); | 9718 | bnx2x_dcbx_stop_hw_tx(bp); |
9719 | |||
9720 | if (test_and_clear_bit(BNX2X_SP_RTNL_TX_RESUME, &bp->sp_rtnl_state)) | ||
9721 | bnx2x_dcbx_resume_hw_tx(bp); | 9719 | bnx2x_dcbx_resume_hw_tx(bp); |
9720 | } | ||
9722 | 9721 | ||
9723 | /* work which needs rtnl lock not-taken (as it takes the lock itself and | 9722 | /* work which needs rtnl lock not-taken (as it takes the lock itself and |
9724 | * can be called from other contexts as well) | 9723 | * can be called from other contexts as well) |