From: Felix Gu <ustc.gu@gmail.com>
To: Mark Brown <broonie@kernel.org>,
Kamlakant Patel <kamlakant.patel@broadcom.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
Felix Gu <ustc.gu@gmail.com>
Subject: [PATCH] spi: xlp: reinitialize completion before each transfer block
Date: Tue, 03 Nov 2026 20:00:22 +0800 [thread overview]
Message-ID: <20261103-xlp-v1-1-696d0a50b84e@gmail.com> (raw)
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>
next reply other threads:[~2026-11-03 12:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 12:00 Felix Gu [this message]
2026-11-03 18:37 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261103-xlp-v1-1-696d0a50b84e@gmail.com \
--to=ustc.gu@gmail.com \
--cc=broonie@kernel.org \
--cc=kamlakant.patel@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®