From: Adrian Hunter <adrian.hunter@intel.com>
To: Wenchao Chen <wenchao.chen666@gmail.com>, ulf.hansson@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
zhang.lyra@gmail.com, lzx.stg@gmail.com
Subject: Re: [PATCH Vx 5/5] mmc: sdhci: Fix host->cmd is null
Date: Wed, 7 Sep 2022 10:01:50 +0300 [thread overview]
Message-ID: <8a4ae419-c5f8-fe2d-7513-faa4e24656fd@intel.com> (raw)
In-Reply-To: <20220907035847.13783-1-wenchao.chen666@gmail.com>
Don't know what is going on with the "Vx 5/5"? Ignoring it.
On 7/09/22 06:58, Wenchao Chen wrote:
> From: Wenchao Chen <wenchao.chen@unisoc.com>
>
> When data crc occurs, the kernel will panic because host->cmd is null.
>
Fixes: efe8f5c9b5e1 ("mmc: sdhci: Capture eMMC and SD card errors")
> Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Cc: stable@vger.kernel.org
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Thank you!
> ---
> drivers/mmc/host/sdhci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 7689ffe..2511728 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -3928,7 +3928,7 @@ bool sdhci_cqe_irq(struct sdhci_host *host, u32 intmask, int *cmd_error,
>
> if (intmask & (SDHCI_INT_INDEX | SDHCI_INT_END_BIT | SDHCI_INT_CRC)) {
> *cmd_error = -EILSEQ;
> - if (!mmc_op_tuning(host->cmd->opcode))
> + if (!mmc_op_tuning(SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND))))
> sdhci_err_stats_inc(host, CMD_CRC);
> } else if (intmask & SDHCI_INT_TIMEOUT) {
> *cmd_error = -ETIMEDOUT;
> @@ -3938,7 +3938,7 @@ bool sdhci_cqe_irq(struct sdhci_host *host, u32 intmask, int *cmd_error,
>
> if (intmask & (SDHCI_INT_DATA_END_BIT | SDHCI_INT_DATA_CRC)) {
> *data_error = -EILSEQ;
> - if (!mmc_op_tuning(host->cmd->opcode))
> + if (!mmc_op_tuning(SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND))))
> sdhci_err_stats_inc(host, DAT_CRC);
> } else if (intmask & SDHCI_INT_DATA_TIMEOUT) {
> *data_error = -ETIMEDOUT;
next prev parent reply other threads:[~2022-09-07 7:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 3:58 Wenchao Chen
2022-09-07 7:01 ` Adrian Hunter [this message]
2022-09-14 14:00 ` Ulf Hansson
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=8a4ae419-c5f8-fe2d-7513-faa4e24656fd@intel.com \
--to=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=lzx.stg@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=wenchao.chen666@gmail.com \
--cc=zhang.lyra@gmail.com \
/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®