Skip to contentSkip to conversation

net: fec: fix rare tx timeout

PATCH In review [email protected] 2 participants 3 messages Oct 2, 2018 – Oct 3, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover net: fec: fix rare tx timeout

From: Rickard x Andersson <[email protected]>

This patch is not fully verified yet but I would much appreciate feedback.

Rickard x Andersson (1):
net: fec: fix rare tx timeout

 drivers/net/ethernet/freescale/fec_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 net: fec: fix rare tx timeout

From: Rickard x Andersson <[email protected]>

During certain heavy network loads TX could time out with TX ring dump.
TX is sometimes never restarted after reaching "tx_stop_threshold" because function "fec_enet_tx_queue" only tests the first queue.

In addition the TX timeout callback function failed to recover because it also operated only on the first queue.

---
 drivers/net/ethernet/freescale/fec_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +4 -4
index eb2ea231c7..8bfa6ef826 100644
@@ -1155,7 +1155,7 @@ static void fec_enet_timeout_work(struct work_struct *work)
 		napi_disable(&fep->napi);
 		netif_tx_lock_bh(ndev);
 		fec_restart(ndev);
-		netif_wake_queue(ndev);
+		netif_tx_wake_all_queues(ndev);
 		netif_tx_unlock_bh(ndev);
 		napi_enable(&fep->napi);
 	}
@@ -1270,7 +1270,7 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
 
 		/* Since we have freed up a buffer, the ring is no longer full
 		 */
-		if (netif_queue_stopped(ndev)) {
+		if (netif_tx_queue_stopped(nq)) {
 			entries_free = fec_enet_get_free_txdesc_num(txq);
 			if (entries_free >= txq->tx_wake_threshold)
 				netif_tx_wake_queue(nq);
@@ -1747,7 +1747,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
 			napi_disable(&fep->napi);
 			netif_tx_lock_bh(ndev);
 			fec_restart(ndev);
-			netif_wake_queue(ndev);
+			netif_tx_wake_all_queues(ndev);
 			netif_tx_unlock_bh(ndev);
 			napi_enable(&fep->napi);
 		}
@@ -2249,7 +2249,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
 		napi_disable(&fep->napi);
 		netif_tx_lock_bh(ndev);
 		fec_restart(ndev);
-		netif_wake_queue(ndev);
+		netif_tx_wake_all_queues(ndev);
 		netif_tx_unlock_bh(ndev);
 		napi_enable(&fep->napi);
 	}
Signature · 1 line
2.11.0
maintainer
#2 lore raw

From: <[email protected]>
Date: Tue, 2 Oct 2018 14:49:32 +0200

Quoted 8 lines

From: Rickard x Andersson <[email protected]>

During certain heavy network loads TX could time out with TX ring dump.
TX is sometimes never restarted after reaching "tx_stop_threshold" because function "fec_enet_tx_queue" only tests the first queue.

Quoted 4 lines

In addition the TX timeout callback function failed to recover because it also operated only on the first queue.

Applied and queued up for -stable.