diff options
author | Anish Bhatt <anish@chelsio.com> | 2014-08-05 19:05:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-05 19:48:59 -0400 |
commit | 30f00847953e3aa3f710d62ffd37b42042807900 (patch) | |
tree | f158748e4c7e7d2e1c999b66152157c53b84a4ee /drivers/net | |
parent | 1bb5a356c3ea6e633908e0ebd6695b13debc3d86 (diff) |
cxgb4 : Disable recursive mailbox commands when enabling vi
Enabling a Virtual Interface can result in an interrupt during the processing
of the VI Enable command and, in some paths, result in an attempt to issue
another command in the interrupt context, eventually crashing the system. Thus,
we disable interrupts during the course of the VI Enable command and ensure
enable doesn't sleep.
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 8b46534b06c1..4247356c16ff 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -673,9 +673,12 @@ static int link_start(struct net_device *dev) | |||
673 | if (ret == 0) | 673 | if (ret == 0) |
674 | ret = t4_link_start(pi->adapter, mb, pi->tx_chan, | 674 | ret = t4_link_start(pi->adapter, mb, pi->tx_chan, |
675 | &pi->link_cfg); | 675 | &pi->link_cfg); |
676 | if (ret == 0) | 676 | if (ret == 0) { |
677 | local_bh_disable(); | ||
677 | ret = t4_enable_vi_params(pi->adapter, mb, pi->viid, true, | 678 | ret = t4_enable_vi_params(pi->adapter, mb, pi->viid, true, |
678 | true, CXGB4_DCB_ENABLED); | 679 | true, CXGB4_DCB_ENABLED); |
680 | local_bh_enable(); | ||
681 | } | ||
679 | 682 | ||
680 | return ret; | 683 | return ret; |
681 | } | 684 | } |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 448bec119c3c..a853133d8db8 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |||
@@ -3558,7 +3558,7 @@ int t4_enable_vi_params(struct adapter *adap, unsigned int mbox, | |||
3558 | c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_IEN(rx_en) | | 3558 | c.ien_to_len16 = htonl(FW_VI_ENABLE_CMD_IEN(rx_en) | |
3559 | FW_VI_ENABLE_CMD_EEN(tx_en) | FW_LEN16(c) | | 3559 | FW_VI_ENABLE_CMD_EEN(tx_en) | FW_LEN16(c) | |
3560 | FW_VI_ENABLE_CMD_DCB_INFO(dcb_en)); | 3560 | FW_VI_ENABLE_CMD_DCB_INFO(dcb_en)); |
3561 | return t4_wr_mbox(adap, mbox, &c, sizeof(c), NULL); | 3561 | return t4_wr_mbox_ns(adap, mbox, &c, sizeof(c), NULL); |
3562 | } | 3562 | } |
3563 | 3563 | ||
3564 | /** | 3564 | /** |