All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] mmc: core: Allow host controllers to require R1B for CMD6" failed to apply to 5.5-stable tree
@ 2020-03-16 11:31 gregkh
  2020-03-18 19:25 ` Sasha Levin
  0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2020-03-16 11:31 UTC (permalink / raw)
  To: ulf.hansson, anders.roxell, faiz_abbas, pgwipeout, skomatineni, stable
  Cc: stable


The patch below does not apply to the 5.5-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 1292e3efb149ee21d8d33d725eeed4e6b1ade963 Mon Sep 17 00:00:00 2001
From: Ulf Hansson <ulf.hansson@linaro.org>
Date: Tue, 10 Mar 2020 12:49:43 +0100
Subject: [PATCH] mmc: core: Allow host controllers to require R1B for CMD6

It has turned out that some host controllers can't use R1B for CMD6 and
other commands that have R1B associated with them. Therefore invent a new
host cap, MMC_CAP_NEED_RSP_BUSY to let them specify this.

In __mmc_switch(), let's check the flag and use it to prevent R1B responses
from being converted into R1. Note that, this also means that the host are
on its own, when it comes to manage the busy timeout.

Suggested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Cc: <stable@vger.kernel.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Tested-by: Faiz Abbas <faiz_abbas@ti.com>
Tested-By: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index da425ee2d9bf..e025604e17d4 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -542,9 +542,11 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
 	 * If the max_busy_timeout of the host is specified, make sure it's
 	 * enough to fit the used timeout_ms. In case it's not, let's instruct
 	 * the host to avoid HW busy detection, by converting to a R1 response
-	 * instead of a R1B.
+	 * instead of a R1B. Note, some hosts requires R1B, which also means
+	 * they are on their own when it comes to deal with the busy timeout.
 	 */
-	if (host->max_busy_timeout && (timeout_ms > host->max_busy_timeout))
+	if (!(host->caps & MMC_CAP_NEED_RSP_BUSY) && host->max_busy_timeout &&
+	    (timeout_ms > host->max_busy_timeout))
 		use_r1b_resp = false;
 
 	cmd.opcode = MMC_SWITCH;
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index ba703384bea0..4c5eb3aa8e72 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -333,6 +333,7 @@ struct mmc_host {
 				 MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | \
 				 MMC_CAP_UHS_DDR50)
 #define MMC_CAP_SYNC_RUNTIME_PM	(1 << 21)	/* Synced runtime PM suspends. */
+#define MMC_CAP_NEED_RSP_BUSY	(1 << 22)	/* Commands with R1B can't use R1. */
 #define MMC_CAP_DRIVER_TYPE_A	(1 << 23)	/* Host supports Driver Type A */
 #define MMC_CAP_DRIVER_TYPE_C	(1 << 24)	/* Host supports Driver Type C */
 #define MMC_CAP_DRIVER_TYPE_D	(1 << 25)	/* Host supports Driver Type D */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] mmc: core: Allow host controllers to require R1B for CMD6" failed to apply to 5.5-stable tree
  2020-03-16 11:31 FAILED: patch "[PATCH] mmc: core: Allow host controllers to require R1B for CMD6" failed to apply to 5.5-stable tree gregkh
@ 2020-03-18 19:25 ` Sasha Levin
  2020-03-20  9:12   ` Ulf Hansson
  0 siblings, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2020-03-18 19:25 UTC (permalink / raw)
  To: gregkh
  Cc: ulf.hansson, anders.roxell, faiz_abbas, pgwipeout, skomatineni, stable

On Mon, Mar 16, 2020 at 12:31:18PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.5-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 1292e3efb149ee21d8d33d725eeed4e6b1ade963 Mon Sep 17 00:00:00 2001
>From: Ulf Hansson <ulf.hansson@linaro.org>
>Date: Tue, 10 Mar 2020 12:49:43 +0100
>Subject: [PATCH] mmc: core: Allow host controllers to require R1B for CMD6
>
>It has turned out that some host controllers can't use R1B for CMD6 and
>other commands that have R1B associated with them. Therefore invent a new
>host cap, MMC_CAP_NEED_RSP_BUSY to let them specify this.
>
>In __mmc_switch(), let's check the flag and use it to prevent R1B responses
>from being converted into R1. Note that, this also means that the host are
>on its own, when it comes to manage the busy timeout.
>
>Suggested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>Cc: <stable@vger.kernel.org>
>Tested-by: Anders Roxell <anders.roxell@linaro.org>
>Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
>Tested-by: Faiz Abbas <faiz_abbas@ti.com>
>Tested-By: Peter Geis <pgwipeout@gmail.com>
>Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

I've fixed up and queued this whole mmc series of stable tagged patches
for 4.19-5.5.

-- 
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] mmc: core: Allow host controllers to require R1B for CMD6" failed to apply to 5.5-stable tree
  2020-03-18 19:25 ` Sasha Levin
@ 2020-03-20  9:12   ` Ulf Hansson
  2020-03-20  9:50     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Ulf Hansson @ 2020-03-20  9:12 UTC (permalink / raw)
  To: Sasha Levin, Greg Kroah-Hartman
  Cc: Anders Roxell, Faiz Abbas, Peter Geis, Sowjanya Komatineni,
	# 4.0+,
	Naresh Kamboju

+ Naresh

On Wed, 18 Mar 2020 at 20:25, Sasha Levin <sashal@kernel.org> wrote:
>
> On Mon, Mar 16, 2020 at 12:31:18PM +0100, gregkh@linuxfoundation.org wrote:
> >
> >The patch below does not apply to the 5.5-stable tree.
> >If someone wants it applied there, or to any other stable or longterm
> >tree, then please email the backport, including the original git commit
> >id to <stable@vger.kernel.org>.
> >
> >thanks,
> >
> >greg k-h
> >
> >------------------ original commit in Linus's tree ------------------
> >
> >From 1292e3efb149ee21d8d33d725eeed4e6b1ade963 Mon Sep 17 00:00:00 2001
> >From: Ulf Hansson <ulf.hansson@linaro.org>
> >Date: Tue, 10 Mar 2020 12:49:43 +0100
> >Subject: [PATCH] mmc: core: Allow host controllers to require R1B for CMD6
> >
> >It has turned out that some host controllers can't use R1B for CMD6 and
> >other commands that have R1B associated with them. Therefore invent a new
> >host cap, MMC_CAP_NEED_RSP_BUSY to let them specify this.
> >
> >In __mmc_switch(), let's check the flag and use it to prevent R1B responses
> >from being converted into R1. Note that, this also means that the host are
> >on its own, when it comes to manage the busy timeout.
> >
> >Suggested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> >Cc: <stable@vger.kernel.org>
> >Tested-by: Anders Roxell <anders.roxell@linaro.org>
> >Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> >Tested-by: Faiz Abbas <faiz_abbas@ti.com>
> >Tested-By: Peter Geis <pgwipeout@gmail.com>
> >Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> I've fixed up and queued this whole mmc series of stable tagged patches
> for 4.19-5.5.

I looked at stable-rc tree and realized that you have also picked the
following patch:

commit 533a6cfe08f96a7b5c65e06d20916d552c11b256
Author: Ulf Hansson <ulf.hansson@linaro.org>
Date:   Wed Jan 22 15:27:47 2020 +0100
mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()

I assume this one was needed to apply the others mmc patches on top.
This is a problem, because the above patch should not go for stable as
it causes problems (unless additional patches are backported as well).

I suggest to drop the whole slew of mmc patches for the current stable
rcs. Then I can send manual backports instead, is that okay?

Kind regards
Uffe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: FAILED: patch "[PATCH] mmc: core: Allow host controllers to require R1B for CMD6" failed to apply to 5.5-stable tree
  2020-03-20  9:12   ` Ulf Hansson
@ 2020-03-20  9:50     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-20  9:50 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Sasha Levin, Anders Roxell, Faiz Abbas, Peter Geis,
	Sowjanya Komatineni, # 4.0+,
	Naresh Kamboju

On Fri, Mar 20, 2020 at 10:12:15AM +0100, Ulf Hansson wrote:
> + Naresh
> 
> On Wed, 18 Mar 2020 at 20:25, Sasha Levin <sashal@kernel.org> wrote:
> >
> > On Mon, Mar 16, 2020 at 12:31:18PM +0100, gregkh@linuxfoundation.org wrote:
> > >
> > >The patch below does not apply to the 5.5-stable tree.
> > >If someone wants it applied there, or to any other stable or longterm
> > >tree, then please email the backport, including the original git commit
> > >id to <stable@vger.kernel.org>.
> > >
> > >thanks,
> > >
> > >greg k-h
> > >
> > >------------------ original commit in Linus's tree ------------------
> > >
> > >From 1292e3efb149ee21d8d33d725eeed4e6b1ade963 Mon Sep 17 00:00:00 2001
> > >From: Ulf Hansson <ulf.hansson@linaro.org>
> > >Date: Tue, 10 Mar 2020 12:49:43 +0100
> > >Subject: [PATCH] mmc: core: Allow host controllers to require R1B for CMD6
> > >
> > >It has turned out that some host controllers can't use R1B for CMD6 and
> > >other commands that have R1B associated with them. Therefore invent a new
> > >host cap, MMC_CAP_NEED_RSP_BUSY to let them specify this.
> > >
> > >In __mmc_switch(), let's check the flag and use it to prevent R1B responses
> > >from being converted into R1. Note that, this also means that the host are
> > >on its own, when it comes to manage the busy timeout.
> > >
> > >Suggested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> > >Cc: <stable@vger.kernel.org>
> > >Tested-by: Anders Roxell <anders.roxell@linaro.org>
> > >Tested-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> > >Tested-by: Faiz Abbas <faiz_abbas@ti.com>
> > >Tested-By: Peter Geis <pgwipeout@gmail.com>
> > >Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> >
> > I've fixed up and queued this whole mmc series of stable tagged patches
> > for 4.19-5.5.
> 
> I looked at stable-rc tree and realized that you have also picked the
> following patch:
> 
> commit 533a6cfe08f96a7b5c65e06d20916d552c11b256
> Author: Ulf Hansson <ulf.hansson@linaro.org>
> Date:   Wed Jan 22 15:27:47 2020 +0100
> mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
> 
> I assume this one was needed to apply the others mmc patches on top.
> This is a problem, because the above patch should not go for stable as
> it causes problems (unless additional patches are backported as well).
> 
> I suggest to drop the whole slew of mmc patches for the current stable
> rcs. Then I can send manual backports instead, is that okay?

Yes, I have now done that, having a properly backported set of patches
would be great, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-20  9:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 11:31 FAILED: patch "[PATCH] mmc: core: Allow host controllers to require R1B for CMD6" failed to apply to 5.5-stable tree gregkh
2020-03-18 19:25 ` Sasha Levin
2020-03-20  9:12   ` Ulf Hansson
2020-03-20  9:50     ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.