mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] spi: xlp: reinitialize completion before each transfer block
@ 2026-11-03 12:00 Felix Gu
  2026-11-03 18:37 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-11-03 12:00 UTC (permalink / raw)
  To: Mark Brown, Kamlakant Patel; +Cc: linux-spi, linux-kernel, Felix Gu

Reinitialize the completion before each transfer block to prevent
wait_for_completion_timeout() from returning immediately on a stale
completion count left by a prior transfer block.

Fixes: d8c80d49cfa0 ("spi/xlp: SPI controller driver for Netlogic XLP SoCs")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-xlp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-xlp.c b/drivers/spi/spi-xlp.c
index d014955e6d4b..fce8f50cd2a5 100644
--- a/drivers/spi/spi-xlp.c
+++ b/drivers/spi/spi-xlp.c
@@ -279,6 +279,8 @@ static int xlp_spi_xfer_block(struct  xlp_spi_priv *xs,
 	xs->rx_len = (xs->rx_buf == NULL) ? 0 : xfer_len;
 	xs->txerrors = xs->rxerrors = 0;
 
+	reinit_completion(&xs->done);
+
 	/* fill TXDATA_FIFO, then send the CMD */
 	if (xs->tx_len)
 		xlp_spi_fill_txfifo(xs);

---
base-commit: a39c950806213f6861d00f90729acaaa21f2d95a
change-id: 20261103-xlp-4ee821c8a89d

Best regards,
--  
Felix Gu <ustc.gu@gmail.com>


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

end of thread, other threads:[~2026-11-04  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:00 [PATCH] spi: xlp: reinitialize completion before each transfer block Felix Gu
2026-11-03 18:37 ` Mark Brown

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

all inboxes | Powered by JetHome®