net: qca_spi: Make sure the QCA7000 reset is triggered
authorStefan Wahren <stefan.wahren@i2se.com>
Wed, 18 Jul 2018 06:31:44 +0000 (08:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jul 2018 22:19:08 +0000 (15:19 -0700)
In case the SPI thread is not running, a simple reset of sync
state won't fix the transmit timeout. We also need to wake up the kernel
thread.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Fixes: ed7d42e24eff ("net: qca_spi: fix transmit queue timeout handling")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/qca_spi.c

index 7db149f90fe3ad9f50e9cd1351777d8596cff62d..7fa815d189abce2a20e35bec125d52f7575a6679 100644 (file)
@@ -760,6 +760,9 @@ qcaspi_netdev_tx_timeout(struct net_device *dev)
        qca->net_dev->stats.tx_errors++;
        /* Trigger tx queue flush and QCA7000 reset */
        qca->sync = QCASPI_SYNC_UNKNOWN;
+
+       if (qca->spi_thread)
+               wake_up_process(qca->spi_thread);
 }
 
 static int