All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: qca_spi: fix transmit queue timeout handling
@ 2015-12-04 15:29 Stefan Wahren
  2015-12-06 17:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Wahren @ 2015-12-04 15:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, linux-kernel, Stefan Wahren, stable

In case of a tx queue timeout every transmit is blocked until the
QCA7000 resets himself and triggers a sync which makes the driver
flushs the tx ring. So avoid this blocking situation by triggering
the sync immediately after the timeout. Waking the queue doesn't
make sense in this situation.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Cc: <stable@vger.kernel.org> # v3.18+
Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")

---
 drivers/net/ethernet/qualcomm/qca_spi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
index ddb2c6c..689a4a5 100644
--- a/drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
@@ -736,9 +736,8 @@ qcaspi_netdev_tx_timeout(struct net_device *dev)
 	netdev_info(qca->net_dev, "Transmit timeout at %ld, latency %ld\n",
 		    jiffies, jiffies - dev->trans_start);
 	qca->net_dev->stats.tx_errors++;
-	/* wake the queue if there is room */
-	if (qcaspi_tx_ring_has_space(&qca->txr))
-		netif_wake_queue(dev);
+	/* Trigger tx queue flush and QCA7000 reset */
+	qca->sync = QCASPI_SYNC_UNKNOWN;
 }
 
 static int
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: qca_spi: fix transmit queue timeout handling
  2015-12-04 15:29 [PATCH] net: qca_spi: fix transmit queue timeout handling Stefan Wahren
@ 2015-12-06 17:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-12-06 17:03 UTC (permalink / raw)
  To: stefan.wahren; +Cc: netdev, linux-kernel, stable

From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Fri,  4 Dec 2015 16:29:10 +0100

> In case of a tx queue timeout every transmit is blocked until the
> QCA7000 resets himself and triggers a sync which makes the driver
> flushs the tx ring. So avoid this blocking situation by triggering
> the sync immediately after the timeout. Waking the queue doesn't
> make sense in this situation.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")

Applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-06 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 15:29 [PATCH] net: qca_spi: fix transmit queue timeout handling Stefan Wahren
2015-12-06 17:03 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.