Skip to content

Commit

Permalink
net: qca_spi: Make sure the QCA7000 reset is triggered
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: ed7d42e ("net: qca_spi: fix transmit queue timeout handling")
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lategoodbye authored and davem330 committed Jul 18, 2018
1 parent b2bab42 commit 711c62d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/qualcomm/qca_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 711c62d

Please sign in to comment.