Skip to content

Commit

Permalink
s390/qeth: fix cancelling of TX timer on dev_close()
Browse files Browse the repository at this point in the history
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: ee1e52d ("s390/qeth: add TX IRQ coalescing support for IQD devices")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julian Wiedmann authored and David S. Miller committed May 4, 2020
1 parent d975cb7 commit c649c41
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/s390/net/qeth_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c649c41

Please sign in to comment.