Skip to content

Commit 92717c2

Browse files
lategoodbyedavem330
authored andcommitted
net: qca_spi: Avoid high load if QCA7000 is not available
In case the QCA7000 is not available via SPI (e.g. in reset), the driver will cause a high load. The reason for this is that the synchronization is never finished and schedule() is never called. Since the synchronization is not timing critical, it's safe to drop this from the scheduling condition. Signed-off-by: Stefan Wahren <[email protected]> Fixes: 291ab06 ("net: qualcomm: new Ethernet over SPI driver for QCA7000") Signed-off-by: David S. Miller <[email protected]>
1 parent c938ab4 commit 92717c2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/qualcomm/qca_spi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,7 @@ qcaspi_spi_thread(void *data)
582582
while (!kthread_should_stop()) {
583583
set_current_state(TASK_INTERRUPTIBLE);
584584
if ((qca->intr_req == qca->intr_svc) &&
585-
(qca->txr.skb[qca->txr.head] == NULL) &&
586-
(qca->sync == QCASPI_SYNC_READY))
585+
!qca->txr.skb[qca->txr.head])
587586
schedule();
588587

589588
set_current_state(TASK_RUNNING);

0 commit comments

Comments
 (0)