Skip to contentSkip to conversation

s390/qeth: fix cancelling of TX timer on dev_close()

PATCH Applied Julian Wiedmann 2 participants 2 messages May 4, 2020

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

PATCH 1/1 s390/qeth: fix cancelling of TX timer on dev_close()

With the introduction of TX coalescing, .ndo_start_xmit now potentially starts the TX completion timer. So only kill the timer _after_ TX has been disabled.

Fixes ee1e52d1e4bb ("s390/qeth: add TX IRQ coalescing support for IQD devices")
---
 drivers/s390/net/qeth_core_main.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/s390/net/qeth_core_main.c +5 -5
index f7689461c242..569966bdc513 100644
@@ -6717,17 +6717,17 @@ int qeth_stop(struct net_device *dev)
 		unsigned int i;
 
 		/* Quiesce the NAPI instances: */
-		qeth_for_each_output_queue(card, queue, i) {
+		qeth_for_each_output_queue(card, queue, i)
 			napi_disable(&queue->napi);
-			del_timer_sync(&queue->timer);
-		}
 
 		/* Stop .ndo_start_xmit, might still access queue->napi. */
 		netif_tx_disable(dev);
 
-		/* Queues may get re-allocated, so remove the NAPIs here. */
-		qeth_for_each_output_queue(card, queue, i)
+		qeth_for_each_output_queue(card, queue, i) {
+			del_timer_sync(&queue->timer);
+			/* Queues may get re-allocated, so remove the NAPIs. */
 			netif_napi_del(&queue->napi);
+		}
 	} else {
 		netif_tx_disable(dev);
 	}
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

From: Julian Wiedmann <[email protected]>
Date: Mon, 4 May 2020 19:39:42 +0200

Quoted 6 lines

With the introduction of TX coalescing, .ndo_start_xmit now potentially starts the TX completion timer. So only kill the timer _after_ TX has been disabled.

Fixes ee1e52d1e4bb ("s390/qeth: add TX IRQ coalescing support for IQD devices")

Applied, thanks Julian.