net: qca_spi: Fix race condition in spi transfers
With performance optimization the spi transfer and messages of basic
register operations like qcaspi_read_register moved into the private
driver structure. But they weren't protected against mutual access
(e.g. between driver kthread and ethtool). So dumping the QCA7000
registers via ethtool during network traffic could make spi_sync
hang forever, because the completion in spi_message is overwritten.
So revert the optimization completely.
Fixes: 291ab06ecf
("net: qualcomm: new Ethernet over SPI driver for QCA700")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9d7f19dc46
commit
e65a9e480e
@@ -83,11 +83,6 @@ struct qcaspi {
|
||||
struct tx_ring txr;
|
||||
struct qcaspi_stats stats;
|
||||
|
||||
struct spi_message spi_msg1;
|
||||
struct spi_message spi_msg2;
|
||||
struct spi_transfer spi_xfer1;
|
||||
struct spi_transfer spi_xfer2[2];
|
||||
|
||||
u8 *rx_buffer;
|
||||
u32 buffer_size;
|
||||
u8 sync;
|
||||
|
Reference in New Issue
Block a user