diff mbox

[net-next] bnxt_en: Fix xmit_more with BQL.

Message ID 1496188980-13392-1-git-send-email-michael.chan@broadcom.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Michael Chan May 31, 2017, 12:03 a.m. UTC
We need to write the doorbell if BQL has stopped the queue and
skb->xmit_more is set.  Otherwise it is possible for the tx queue to
rot and cause tx timeout.

Fixes: 4d172f21cefe ("bnxt_en: Implement xmit_more.")
Suggested-by: Yuval Mintz <yuval.mintz@cavium.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller May 31, 2017, 2:38 a.m. UTC | #1
From: Michael Chan <michael.chan@broadcom.com>
Date: Tue, 30 May 2017 20:03:00 -0400

> We need to write the doorbell if BQL has stopped the queue and
> skb->xmit_more is set.  Otherwise it is possible for the tx queue to
> rot and cause tx timeout.
> 
> Fixes: 4d172f21cefe ("bnxt_en: Implement xmit_more.")
> Suggested-by: Yuval Mintz <yuval.mintz@cavium.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 954758f..c1cd72a 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -463,7 +463,7 @@  static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	prod = NEXT_TX(prod);
 	txr->tx_prod = prod;
 
-	if (!skb->xmit_more)
+	if (!skb->xmit_more || netif_xmit_stopped(txq))
 		bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod);
 
 tx_done: