linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Bao D. Nguyen" <nguyenb@codeaurora.org>
Cc: ulf.hansson@linaro.org, robh+dt@kernel.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	asutoshd@codeaurora.org, cang@codeaurora.org,
	Sahitya Tummala <stummala@codeaurora.org>
Subject: Re: [<PATCH v1> 6/9] mmc: sdhci-msm: Ignore data timeout error for R1B commands
Date: Wed, 18 Dec 2019 09:34:07 +0100	[thread overview]
Message-ID: <20191218083407.GD1554871@kroah.com> (raw)
In-Reply-To: <22061d3479b876e8590b966162d6385a47f851b1.1576540908.git.nguyenb@codeaurora.org>

On Mon, Dec 16, 2019 at 06:50:39PM -0800, Bao D. Nguyen wrote:
> From: Sahitya Tummala <stummala@codeaurora.org>
> 
> Ignore data timeout error for R1B commands as there will be no
> data associated and the busy timeout value for these commands
> could be lager than the maximum timeout value that controller
> can handle.
> 
> Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
> Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
> ---
>  drivers/mmc/host/sdhci.c | 15 +++++++++------
>  drivers/mmc/host/sdhci.h |  7 +++++++
>  2 files changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index c04e1ac..0a05d74 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2925,12 +2925,6 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
>  		 * above in sdhci_cmd_irq().
>  		 */
>  		if (data_cmd && (data_cmd->flags & MMC_RSP_BUSY)) {
> -			if (intmask & SDHCI_INT_DATA_TIMEOUT) {
> -				host->data_cmd = NULL;
> -				data_cmd->error = -ETIMEDOUT;
> -				__sdhci_finish_mrq(host, data_cmd->mrq);
> -				return;
> -			}
>  			if (intmask & SDHCI_INT_DATA_END) {
>  				host->data_cmd = NULL;
>  				/*
> @@ -2944,6 +2938,15 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
>  				__sdhci_finish_mrq(host, data_cmd->mrq);
>  				return;
>  			}
> +			if (host->quirks2 &
> +				SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD)
> +				return;
> +			if (intmask & SDHCI_INT_DATA_TIMEOUT) {
> +				host->data_cmd = NULL;
> +				data_cmd->error = -ETIMEDOUT;
> +				__sdhci_finish_mrq(host, data_cmd->mrq);
> +				return;
> +			}
>  		}
>  
>  		/*
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index 0ed3e0e..1a88f74 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -482,6 +482,13 @@ struct sdhci_host {
>   * block count.
>   */
>  #define SDHCI_QUIRK2_USE_32BIT_BLK_CNT			(1<<18)
> +/*
> + * Ignore data timeout error for R1B commands as there will be no
> + * data associated and the busy timeout value for these commands
> + * could be lager than the maximum timeout value that controller
> + * can handle.
> + */
> +#define SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD         (1<<19)

No tabs?

And what about using BIT(19) instead?

thanks,

greg k-h

  reply	other threads:[~2019-12-18  8:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17  2:50 [<PATCH v1> 0/9] SD card bug fixes Bao D. Nguyen
2019-12-17  2:50 ` [<PATCH v1> 1/9] mmc: core: Add a cap to use long discard size Bao D. Nguyen
2019-12-17  7:09   ` Ulf Hansson
2019-12-17  2:50 ` [<PATCH v1> 2/9] mmc: core: allow hosts to specify a large " Bao D. Nguyen
2019-12-17  2:50 ` [<PATCH v1> 3/9] mmc: host: Add device_prepare pm for mmc_host Bao D. Nguyen
2019-12-17  2:50 ` [<PATCH v1> 4/9] mmc: core: fix SD card request queue refcount underflow during shutdown Bao D. Nguyen
2019-12-18  8:33   ` Greg KH
2019-12-17  2:50 ` [<PATCH v1> 5/9] mmc: core: fix one NULL pointer dereference after SD card is removed Bao D. Nguyen
2019-12-17  2:50 ` [<PATCH v1> 6/9] mmc: sdhci-msm: Ignore data timeout error for R1B commands Bao D. Nguyen
2019-12-18  8:34   ` Greg KH [this message]
2019-12-17  2:50 ` [<PATCH v1> 7/9] mmc: core: Skip frequency retries for SDCC slots Bao D. Nguyen
2019-12-18  8:34   ` Greg KH
2019-12-18 11:48     ` Ulf Hansson
2019-12-18 12:04       ` Greg Kroah-Hartman
2019-12-18 13:12         ` Ulf Hansson
2019-12-17  2:50 ` [<PATCH v1> 8/9] mmc: core: remove shutdown handler Bao D. Nguyen
2019-12-17  2:50 ` [<PATCH v1> 9/9] mmc: sd: Fix trivial SD card issues Bao D. Nguyen
2019-12-18  8:29   ` Greg KH
2019-12-18 20:16     ` nguyenb
2019-12-18  8:21 ` [<PATCH v1> 0/9] SD card bug fixes Greg KH

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=20191218083407.GD1554871@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nguyenb@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=stummala@codeaurora.org \
    --cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).