[PATCH 3.18 49/56] net: qca_spi: Make sure the QCA7000 reset is triggered

From: Greg Kroah-Hartman
Date: Sun Aug 26 2018 - 02:48:36 EST

3.18-stable review patch. If anyone has any objections, please let me know.


From: Stefan Wahren <stefan.wahren@xxxxxxxx>

[ Upstream commit 711c62dfa6bdb4326ca6c587f295ea5c4f7269de ]

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

Signed-off-by: Stefan Wahren <stefan.wahren@xxxxxxxx>
Fixes: ed7d42e24eff ("net: qca_spi: fix transmit queue timeout handling")
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
drivers/net/ethernet/qualcomm/qca_spi.c | 3 +++
1 file changed, 3 insertions(+)

--- a/drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
@@ -740,6 +740,9 @@ qcaspi_netdev_tx_timeout(struct net_devi
/* Trigger tx queue flush and QCA7000 reset */
+ if (qca->spi_thread)
+ wake_up_process(qca->spi_thread);

static int