Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Christian Löhle" <CLoehle@hyperstone.com>,
	"Avri Altman" <Avri.Altman@wdc.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2] mmc: block: remove non-data R1B ioctl workaround
Date: Tue, 29 Nov 2022 14:36:50 +0200	[thread overview]
Message-ID: <8f2329cf-d482-7147-bd72-b8832e9bf123@intel.com> (raw)
In-Reply-To: <57d4aceb25254e448bd3e575bd99b0c2@hyperstone.com>

On 27/11/22 19:46, Christian Löhle wrote:
> The workaround of pretending R1B non-data transfers are
> data transfers in order for the busy timeout to be respected
> by the host controller driver is removed. It wasn't useful
> in a long time.
> 
> Initially the workaround ensured that R1B commands did not
> time out by setting the data timeout to be the command timeout
> in commit cb87ea28ed9e ("mmc: core: Add mmc CMD+ACMD passthrough ioctl").
> This was moved inside of an if clause with idata->buf_bytes being set
> in commit 4d6144de8ba2 ("mmc: core: check for zero length ioctl data").
> Since the workaround is now inside of the idata->buf_bytes clause
> and intended to fix R1B non-data transfers that do not have buf_bytes
> set we can also remove the workaround altogether.
> Since there are no data transfer invoking R1B commands this was dead
> code.
> 
> Fixes: cb87ea28ed9e ("mmc: core: Add mmc CMD+ACMD passthrough ioctl")
> Signed-off-by: Christian Loehle <cloehle@hyperstone.com>

Doesn't Fixes: 4d6144de8ba2 make more sense?

Otherwise:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
> -v2: clarified commit message, no code change
>  drivers/mmc/core/block.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index db6d8a099910..20da7ed43e6d 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -514,19 +514,6 @@ static int __mmc_blk_ioctl_cmd(struct mmc_card *card, struct mmc_blk_data *md,
>  		if (idata->ic.data_timeout_ns)
>  			data.timeout_ns = idata->ic.data_timeout_ns;
>  
> -		if ((cmd.flags & MMC_RSP_R1B) == MMC_RSP_R1B) {
> -			/*
> -			 * Pretend this is a data transfer and rely on the
> -			 * host driver to compute timeout.  When all host
> -			 * drivers support cmd.cmd_timeout for R1B, this
> -			 * can be changed to:
> -			 *
> -			 *     mrq.data = NULL;
> -			 *     cmd.cmd_timeout = idata->ic.cmd_timeout_ms;
> -			 */
> -			data.timeout_ns = idata->ic.cmd_timeout_ms * 1000000;
> -		}
> -
>  		mrq.data = &data;
>  	}
>  


  reply	other threads:[~2022-11-29 12:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-27 17:46 [PATCHv2] mmc: block: remove non-data R1B ioctl workaround Christian Löhle
2022-11-29 12:36 ` Adrian Hunter [this message]
2022-11-29 12:54 ` 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=8f2329cf-d482-7147-bd72-b8832e9bf123@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Avri.Altman@wdc.com \
    --cc=CLoehle@hyperstone.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.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