mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2 net] net: qca_spi: Avoid high load if QCA7000 is not available
@ 2023-06-14 21:06 Stefan Wahren
  2023-06-19  8:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Wahren @ 2023-06-14 21:06 UTC (permalink / raw)
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Stefan Wahren, Simon Horman, netdev, linux-kernel, Stefan Wahren

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 <stefan.wahren@i2se.com>
Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
---

Changes in V2:
- send from different account which doesn't break the patch

 drivers/net/ethernet/qualcomm/qca_spi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qualcomm/qca_spi.c b/drivers/net/ethernet/qualcomm/qca_spi.c
index bba1947792ea16..90f18ea4c28ba1 100644
--- a/drivers/net/ethernet/qualcomm/qca_spi.c
+++ b/drivers/net/ethernet/qualcomm/qca_spi.c
@@ -582,8 +582,7 @@ qcaspi_spi_thread(void *data)
 	while (!kthread_should_stop()) {
 		set_current_state(TASK_INTERRUPTIBLE);
 		if ((qca->intr_req == qca->intr_svc) &&
-		    (qca->txr.skb[qca->txr.head] == NULL) &&
-		    (qca->sync == QCASPI_SYNC_READY))
+		    !qca->txr.skb[qca->txr.head])
 			schedule();
 
 		set_current_state(TASK_RUNNING);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH V2 net] net: qca_spi: Avoid high load if QCA7000 is not available
  2023-06-14 21:06 [PATCH V2 net] net: qca_spi: Avoid high load if QCA7000 is not available Stefan Wahren
@ 2023-06-19  8:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-06-19  8:40 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: davem, edumazet, kuba, pabeni, stefan.wahren, simon.horman,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 14 Jun 2023 23:06:56 +0200 you wrote:
> 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 <stefan.wahren@i2se.com>
> Fixes: 291ab06ecf67 ("net: qualcomm: new Ethernet over SPI driver for QCA7000")
> 
> [...]

Here is the summary with links:
  - [V2,net] net: qca_spi: Avoid high load if QCA7000 is not available
    https://git.kernel.org/netdev/net/c/92717c2356cb

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-19  8:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14 21:06 [PATCH V2 net] net: qca_spi: Avoid high load if QCA7000 is not available Stefan Wahren
2023-06-19  8:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome