diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-24 03:45:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-24 11:08:13 -0800 |
commit | e1210d127d11fc40d229648c9754aa60776ef796 (patch) | |
tree | edcae49b857172ad2af0ba721d99d715e8f694e7 /drivers/net/bnx2x | |
parent | 37a118452cbc9c0cf0d23bfd16d3ca56058be754 (diff) | |
download | linux-stable-e1210d127d11fc40d229648c9754aa60776ef796.tar.gz linux-stable-e1210d127d11fc40d229648c9754aa60776ef796.tar.bz2 linux-stable-e1210d127d11fc40d229648c9754aa60776ef796.zip |
bnx2x: Disable local BHes to prevent a dead-lock situation
According to Eric's suggestion:
Disable local BHes to prevent a dead-lock situation between sch_direct_xmit()
(Soft_IRQ context) and bnx2x_tx_int (called by bnx2x_run_loopback() - syscall
context), as both are taking a netif_tx_lock().
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_ethtool.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c index d02ffbdc9f0e..03012787de2f 100644 --- a/drivers/net/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/bnx2x/bnx2x_ethtool.c @@ -1499,8 +1499,15 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode, u8 link_up) * updates that have been performed while interrupts were * disabled. */ - if (bp->common.int_block == INT_BLOCK_IGU) + if (bp->common.int_block == INT_BLOCK_IGU) { + /* Disable local BHes to prevent a dead-lock situation between + * sch_direct_xmit() and bnx2x_run_loopback() (calling + * bnx2x_tx_int()), as both are taking netif_tx_lock(). + */ + local_bh_disable(); bnx2x_tx_int(fp_tx); + local_bh_enable(); + } rx_idx = le16_to_cpu(*fp_rx->rx_cons_sb); if (rx_idx != rx_start_idx + num_pkts) |