* [PATCH net-next] bnx2x: fix crash while ethtool -t
@ 2011-12-06 12:05 Dmitry Kravkov
2011-12-06 18:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Kravkov @ 2011-12-06 12:05 UTC (permalink / raw)
To: davem, netdev; +Cc: Dmitry Kravkov, Eilon Greenstein
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>
---
.../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 c679ed9..0b4b1d3 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -1741,6 +1741,7 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode)
u16 len;
int rc = -ENODEV;
u8 *data;
+ struct netdev_queue *txq = netdev_get_tx_queue(bp->dev, txdata->txq_index);
/* check the loopback mode */
switch (loopback_mode) {
@@ -1795,6 +1796,8 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode)
tx_start_idx = le16_to_cpu(*txdata->tx_cons_sb);
rx_start_idx = le16_to_cpu(*fp_rx->rx_cons_sb);
+ netdev_tx_sent_queue(txq, skb->len);
+
pkt_prod = txdata->tx_pkt_prod++;
tx_buf = &txdata->tx_buf_ring[TX_BD(pkt_prod)];
tx_buf->first_bd = txdata->tx_bd_prod;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] bnx2x: fix crash while ethtool -t
2011-12-06 12:05 [PATCH net-next] bnx2x: fix crash while ethtool -t Dmitry Kravkov
@ 2011-12-06 18:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-12-06 18:22 UTC (permalink / raw)
To: dmitry; +Cc: netdev, eilong
From: "Dmitry Kravkov" <dmitry@broadcom.com>
Date: Tue, 6 Dec 2011 14:05:12 +0200
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-06 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 12:05 [PATCH net-next] bnx2x: fix crash while ethtool -t Dmitry Kravkov
2011-12-06 18:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).