diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2011-12-05 21:05:12 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-06 13:21:48 -0500 |
commit | 73dbb5e1627a35c8ab81f3813c096e9e7aaabaaa (patch) | |
tree | a9dbb0876b9c0b409c3ec0c2cf793cf962b38cda /drivers/net/ethernet/broadcom | |
parent | e34c0246d691b2ed4e6622ca7132c3c5ec156ca7 (diff) |
bnx2x: fix crash while ethtool -t
commit 2df1a70aaf70e8dff11b89b938a5f317556ee640 "bnx2x: Support
for byte queue limits" has introduced an asymmetry in usage of
netdev_tx_completed_queue and netdev_tx_sent_queue. Missing
call to netdev_tx_sent_queue causes the crash during ethtool -t.
The patch adds the missing call.
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index e64bdf6f9956..90d44af85600 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |||
@@ -1745,6 +1745,7 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode) | |||
1745 | u16 len; | 1745 | u16 len; |
1746 | int rc = -ENODEV; | 1746 | int rc = -ENODEV; |
1747 | u8 *data; | 1747 | u8 *data; |
1748 | struct netdev_queue *txq = netdev_get_tx_queue(bp->dev, txdata->txq_index); | ||
1748 | 1749 | ||
1749 | /* check the loopback mode */ | 1750 | /* check the loopback mode */ |
1750 | switch (loopback_mode) { | 1751 | switch (loopback_mode) { |
@@ -1799,6 +1800,8 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode) | |||
1799 | tx_start_idx = le16_to_cpu(*txdata->tx_cons_sb); | 1800 | tx_start_idx = le16_to_cpu(*txdata->tx_cons_sb); |
1800 | rx_start_idx = le16_to_cpu(*fp_rx->rx_cons_sb); | 1801 | rx_start_idx = le16_to_cpu(*fp_rx->rx_cons_sb); |
1801 | 1802 | ||
1803 | netdev_tx_sent_queue(txq, skb->len); | ||
1804 | |||
1802 | pkt_prod = txdata->tx_pkt_prod++; | 1805 | pkt_prod = txdata->tx_pkt_prod++; |
1803 | tx_buf = &txdata->tx_buf_ring[TX_BD(pkt_prod)]; | 1806 | tx_buf = &txdata->tx_buf_ring[TX_BD(pkt_prod)]; |
1804 | tx_buf->first_bd = txdata->tx_bd_prod; | 1807 | tx_buf->first_bd = txdata->tx_bd_prod; |