From: Robin van der Gracht <robin@protonic.nl>
To: Barebox <barebox@lists.infradead.org>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>, robin@protonic.nl
Subject: [PATCH] mci: imx-esdhc-common: Don't clear unhandled status bits
Date: Tue, 21 Jun 2022 12:15:29 +0200 [thread overview]
Message-ID: <20220621101529.554322-1-robin@protonic.nl> (raw)
A DMA cmd + data transfer can finish or stop (i.e. on a block gap) before
the status register is cleared. In that case we'll lose track of state
causing sdhci_transfer_data_dma() to loop forever waiting for status bits
that are already cleared.
Clearing SDHCI_INT_CMD_COMPLETE should suffice here. Since it's not
evaluated a second time, clearing it at the start of the function is
sufficient so we can just remove the erroneous status write.
Signed-off-by: Robin van der Gracht <robin@protonic.nl>
---
drivers/mci/imx-esdhc-common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mci/imx-esdhc-common.c b/drivers/mci/imx-esdhc-common.c
index a12db43c88..27293e44b7 100644
--- a/drivers/mci/imx-esdhc-common.c
+++ b/drivers/mci/imx-esdhc-common.c
@@ -176,7 +176,6 @@ int __esdhc_send_cmd(struct fsl_esdhc_host *host, struct mci_cmd *cmd,
}
irqstat = sdhci_read32(&host->sdhci, SDHCI_INT_STATUS);
- sdhci_write32(&host->sdhci, SDHCI_INT_STATUS, irqstat);
if (irqstat & CMD_ERR)
return -EIO;
--
2.34.1
next reply other threads:[~2022-06-21 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 10:15 Robin van der Gracht [this message]
2022-06-22 7:51 ` Sascha Hauer
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=20220621101529.554322-1-robin@protonic.nl \
--to=robin@protonic.nl \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.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