All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mmc: dw_mmc: fix card threshold control configuration
@ 2018-07-03  7:06 ` Qing Xia
  0 siblings, 0 replies; 5+ messages in thread
From: Qing Xia @ 2018-07-03  7:06 UTC (permalink / raw)
  To: ulf.hansson, jh80.chung
  Cc: x00270170, Evgeniy.Didin, shawn.lin, dianders, linux-mmc, linux-kernel

From: x00270170 <xiaqing17@hisilicon.com>

Card write threshold control is supposed to be set since controller
version 2.80a for data write in HS400 mode and data read in
HS200/HS400/SDR104 mode. However the current code returns without
configuring it in the case of data writing in HS400 mode.
Meanwhile the patch fixes that the current code goes to
'disable' when doing data reading in HS400 mode.

Fixes: 7e4bf1bc9543 ("mmc: dw_mmc: add the card write threshold for HS400 mode")
Signed-off-by: Qing Xia <xiaqing17@hisilicon.com>
---
 drivers/mmc/host/dw_mmc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 29a1afa..3ee8f57 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1065,8 +1065,8 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data)
 	 * It's used when HS400 mode is enabled.
 	 */
 	if (data->flags & MMC_DATA_WRITE &&
-		!(host->timing != MMC_TIMING_MMC_HS400))
-		return;
+		host->timing != MMC_TIMING_MMC_HS400)
+		goto disable;
 
 	if (data->flags & MMC_DATA_WRITE)
 		enable = SDMMC_CARD_WR_THR_EN;
@@ -1074,7 +1074,8 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data)
 		enable = SDMMC_CARD_RD_THR_EN;
 
 	if (host->timing != MMC_TIMING_MMC_HS200 &&
-	    host->timing != MMC_TIMING_UHS_SDR104)
+	    host->timing != MMC_TIMING_UHS_SDR104 &&
+	    host->timing != MMC_TIMING_MMC_HS400)
 		goto disable;
 
 	blksz_depth = blksz / (1 << host->data_shift);
-- 
2.8.1


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

* [PATCH v2] mmc: dw_mmc: fix card threshold control configuration
@ 2018-07-03  7:06 ` Qing Xia
  0 siblings, 0 replies; 5+ messages in thread
From: Qing Xia @ 2018-07-03  7:06 UTC (permalink / raw)
  To: ulf.hansson, jh80.chung
  Cc: x00270170, Evgeniy.Didin, shawn.lin, dianders, linux-mmc, linux-kernel

From: x00270170 <xiaqing17@hisilicon.com>

Card write threshold control is supposed to be set since controller
version 2.80a for data write in HS400 mode and data read in
HS200/HS400/SDR104 mode. However the current code returns without
configuring it in the case of data writing in HS400 mode.
Meanwhile the patch fixes that the current code goes to
'disable' when doing data reading in HS400 mode.

Fixes: 7e4bf1bc9543 ("mmc: dw_mmc: add the card write threshold for HS400 mode")
Signed-off-by: Qing Xia <xiaqing17@hisilicon.com>
---
 drivers/mmc/host/dw_mmc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 29a1afa..3ee8f57 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1065,8 +1065,8 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data)
 	 * It's used when HS400 mode is enabled.
 	 */
 	if (data->flags & MMC_DATA_WRITE &&
-		!(host->timing != MMC_TIMING_MMC_HS400))
-		return;
+		host->timing != MMC_TIMING_MMC_HS400)
+		goto disable;
 
 	if (data->flags & MMC_DATA_WRITE)
 		enable = SDMMC_CARD_WR_THR_EN;
@@ -1074,7 +1074,8 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data)
 		enable = SDMMC_CARD_RD_THR_EN;
 
 	if (host->timing != MMC_TIMING_MMC_HS200 &&
-	    host->timing != MMC_TIMING_UHS_SDR104)
+	    host->timing != MMC_TIMING_UHS_SDR104 &&
+	    host->timing != MMC_TIMING_MMC_HS400)
 		goto disable;
 
 	blksz_depth = blksz / (1 << host->data_shift);
-- 
2.8.1

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

* Re: [PATCH v2] mmc: dw_mmc: fix card threshold control configuration
  2018-07-03  7:06 ` Qing Xia
  (?)
@ 2018-07-03  9:00 ` Ulf Hansson
  2018-07-15 20:31   ` Linus Torvalds
  -1 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2018-07-03  9:00 UTC (permalink / raw)
  To: Qing Xia
  Cc: Jaehoon Chung, Evgeniy Didin, Shawn Lin, Doug Anderson,
	linux-mmc, Linux Kernel Mailing List

On 3 July 2018 at 09:06, Qing Xia <xiaqing17@hisilicon.com> wrote:
> From: x00270170 <xiaqing17@hisilicon.com>
>
> Card write threshold control is supposed to be set since controller
> version 2.80a for data write in HS400 mode and data read in
> HS200/HS400/SDR104 mode. However the current code returns without
> configuring it in the case of data writing in HS400 mode.
> Meanwhile the patch fixes that the current code goes to
> 'disable' when doing data reading in HS400 mode.
>
> Fixes: 7e4bf1bc9543 ("mmc: dw_mmc: add the card write threshold for HS400 mode")
> Signed-off-by: Qing Xia <xiaqing17@hisilicon.com>

Thanks, applied/moved to fixes for 4.18!

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 29a1afa..3ee8f57 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1065,8 +1065,8 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data)
>          * It's used when HS400 mode is enabled.
>          */
>         if (data->flags & MMC_DATA_WRITE &&
> -               !(host->timing != MMC_TIMING_MMC_HS400))
> -               return;
> +               host->timing != MMC_TIMING_MMC_HS400)
> +               goto disable;
>
>         if (data->flags & MMC_DATA_WRITE)
>                 enable = SDMMC_CARD_WR_THR_EN;
> @@ -1074,7 +1074,8 @@ static void dw_mci_ctrl_thld(struct dw_mci *host, struct mmc_data *data)
>                 enable = SDMMC_CARD_RD_THR_EN;
>
>         if (host->timing != MMC_TIMING_MMC_HS200 &&
> -           host->timing != MMC_TIMING_UHS_SDR104)
> +           host->timing != MMC_TIMING_UHS_SDR104 &&
> +           host->timing != MMC_TIMING_MMC_HS400)
>                 goto disable;
>
>         blksz_depth = blksz / (1 << host->data_shift);
> --
> 2.8.1
>

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

* Re: [PATCH v2] mmc: dw_mmc: fix card threshold control configuration
  2018-07-03  9:00 ` Ulf Hansson
@ 2018-07-15 20:31   ` Linus Torvalds
  2018-07-16 10:01     ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Torvalds @ 2018-07-15 20:31 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: xiaqing17, Jaehoon Chung, Evgeniy.Didin, shawn.lin,
	Douglas Anderson, linux-mmc, Linux Kernel Mailing List

On Tue, Jul 3, 2018 at 2:00 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On 3 July 2018 at 09:06, Qing Xia <xiaqing17@hisilicon.com> wrote:
> > From: x00270170 <xiaqing17@hisilicon.com>
> >
> > Card write threshold control is supposed to be set since controller
>> [..]
> > Signed-off-by: Qing Xia <xiaqing17@hisilicon.com>
>
> Thanks, applied/moved to fixes for 4.18!

.. and during making my 4.18-rc5 announcement, I saw the odd name in
the shortlog.

Now Qing Xia is forever attributed as "x00270170". Very odd.

Oh well.

                Linus

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

* Re: [PATCH v2] mmc: dw_mmc: fix card threshold control configuration
  2018-07-15 20:31   ` Linus Torvalds
@ 2018-07-16 10:01     ` Ulf Hansson
  0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2018-07-16 10:01 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Qing Xia, Jaehoon Chung, Evgeniy Didin, Shawn Lin,
	Douglas Anderson, linux-mmc, Linux Kernel Mailing List

On 15 July 2018 at 22:31, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Tue, Jul 3, 2018 at 2:00 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>>
>> On 3 July 2018 at 09:06, Qing Xia <xiaqing17@hisilicon.com> wrote:
>> > From: x00270170 <xiaqing17@hisilicon.com>
>> >
>> > Card write threshold control is supposed to be set since controller
>>> [..]
>> > Signed-off-by: Qing Xia <xiaqing17@hisilicon.com>
>>
>> Thanks, applied/moved to fixes for 4.18!
>
> .. and during making my 4.18-rc5 announcement, I saw the odd name in
> the shortlog.
>
> Now Qing Xia is forever attributed as "x00270170". Very odd.
>
> Oh well.

Apologize, that slipped through, somehow. Will check more closely going forward.

Kind regards
Uffe

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

end of thread, other threads:[~2018-07-16 10:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-03  7:06 [PATCH v2] mmc: dw_mmc: fix card threshold control configuration Qing Xia
2018-07-03  7:06 ` Qing Xia
2018-07-03  9:00 ` Ulf Hansson
2018-07-15 20:31   ` Linus Torvalds
2018-07-16 10:01     ` Ulf Hansson

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.