* [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
@ 2019-11-15 13:44 Eugeniu Rosca
2019-11-15 13:51 ` Wolfram Sang
2019-11-18 9:08 ` Ulf Hansson
0 siblings, 2 replies; 3+ messages in thread
From: Eugeniu Rosca @ 2019-11-15 13:44 UTC (permalink / raw)
To: Ulf Hansson, Wolfram Sang, Masahiro Yamada
Cc: linux-mmc, linux-renesas-soc, linux-kernel, Eugeniu Rosca,
Eugeniu Rosca, Andrew Gabbasov, Harish Jenny K N
Isolated initially to renesas_sdhi_internal_dmac [1], Ulf suggested
adding MMC_CAP_ERASE to the TMIO mmc core:
On Fri, Nov 15, 2019 at 10:27:25AM +0100, Ulf Hansson wrote:
-- snip --
This test and due to the discussions with Wolfram and you in this
thread, I would actually suggest that you enable MMC_CAP_ERASE for all
tmio variants, rather than just for this particular one.
In other words, set the cap in tmio_mmc_host_probe() should be fine,
as it seems none of the tmio variants supports HW busy detection at
this point.
-- snip --
Testing on R-Car H3ULCB-KF doesn't reveal any issues (v5.4-rc7):
root@rcar-gen3:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 59.2G 0 disk <--- eMMC
mmcblk0boot0 179:8 0 4M 1 disk
mmcblk0boot1 179:16 0 4M 1 disk
mmcblk1 179:24 0 30G 0 disk <--- SD card
root@rcar-gen3:~# time blkdiscard /dev/mmcblk0
real 0m8.659s
user 0m0.001s
sys 0m1.920s
root@rcar-gen3:~# time blkdiscard /dev/mmcblk1
real 0m1.176s
user 0m0.001s
sys 0m0.124s
[1] https://lore.kernel.org/linux-renesas-soc/20191112134808.23546-1-erosca@de.adit-jv.com/
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Originally-by: Harish Jenny K N <harish_kandiga@mentor.com>
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
---
drivers/mmc/host/tmio_mmc_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 9b6e1001e77c..dec5a99f52cf 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1184,7 +1184,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
if (ret == -EPROBE_DEFER)
return ret;
- mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
+ mmc->caps |= MMC_CAP_ERASE | MMC_CAP_4_BIT_DATA | pdata->capabilities;
mmc->caps2 |= pdata->capabilities2;
mmc->max_segs = pdata->max_segs ? : 32;
mmc->max_blk_size = TMIO_MAX_BLK_SIZE;
--
2.24.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
2019-11-15 13:44 [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests Eugeniu Rosca
@ 2019-11-15 13:51 ` Wolfram Sang
2019-11-18 9:08 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2019-11-15 13:51 UTC (permalink / raw)
To: Eugeniu Rosca
Cc: Ulf Hansson, Wolfram Sang, Masahiro Yamada, linux-mmc,
linux-renesas-soc, linux-kernel, Eugeniu Rosca, Andrew Gabbasov,
Harish Jenny K N
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
On Fri, Nov 15, 2019 at 02:44:30PM +0100, Eugeniu Rosca wrote:
> Isolated initially to renesas_sdhi_internal_dmac [1], Ulf suggested
> adding MMC_CAP_ERASE to the TMIO mmc core:
>
> On Fri, Nov 15, 2019 at 10:27:25AM +0100, Ulf Hansson wrote:
> -- snip --
> This test and due to the discussions with Wolfram and you in this
> thread, I would actually suggest that you enable MMC_CAP_ERASE for all
> tmio variants, rather than just for this particular one.
>
> In other words, set the cap in tmio_mmc_host_probe() should be fine,
> as it seems none of the tmio variants supports HW busy detection at
> this point.
> -- snip --
>
> Testing on R-Car H3ULCB-KF doesn't reveal any issues (v5.4-rc7):
>
> root@rcar-gen3:~# lsblk
> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
> mmcblk0 179:0 0 59.2G 0 disk <--- eMMC
> mmcblk0boot0 179:8 0 4M 1 disk
> mmcblk0boot1 179:16 0 4M 1 disk
> mmcblk1 179:24 0 30G 0 disk <--- SD card
>
> root@rcar-gen3:~# time blkdiscard /dev/mmcblk0
> real 0m8.659s
> user 0m0.001s
> sys 0m1.920s
>
> root@rcar-gen3:~# time blkdiscard /dev/mmcblk1
> real 0m1.176s
> user 0m0.001s
> sys 0m0.124s
>
> [1] https://lore.kernel.org/linux-renesas-soc/20191112134808.23546-1-erosca@de.adit-jv.com/
>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
> Originally-by: Harish Jenny K N <harish_kandiga@mentor.com>
> Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests
2019-11-15 13:44 [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests Eugeniu Rosca
2019-11-15 13:51 ` Wolfram Sang
@ 2019-11-18 9:08 ` Ulf Hansson
1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2019-11-18 9:08 UTC (permalink / raw)
To: Eugeniu Rosca
Cc: Wolfram Sang, Masahiro Yamada, linux-mmc, Linux-Renesas,
Linux Kernel Mailing List, Eugeniu Rosca, Andrew Gabbasov,
Harish Jenny K N
On Fri, 15 Nov 2019 at 14:45, Eugeniu Rosca <erosca@de.adit-jv.com> wrote:
>
> Isolated initially to renesas_sdhi_internal_dmac [1], Ulf suggested
> adding MMC_CAP_ERASE to the TMIO mmc core:
>
> On Fri, Nov 15, 2019 at 10:27:25AM +0100, Ulf Hansson wrote:
> -- snip --
> This test and due to the discussions with Wolfram and you in this
> thread, I would actually suggest that you enable MMC_CAP_ERASE for all
> tmio variants, rather than just for this particular one.
>
> In other words, set the cap in tmio_mmc_host_probe() should be fine,
> as it seems none of the tmio variants supports HW busy detection at
> this point.
> -- snip --
>
> Testing on R-Car H3ULCB-KF doesn't reveal any issues (v5.4-rc7):
>
> root@rcar-gen3:~# lsblk
> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
> mmcblk0 179:0 0 59.2G 0 disk <--- eMMC
> mmcblk0boot0 179:8 0 4M 1 disk
> mmcblk0boot1 179:16 0 4M 1 disk
> mmcblk1 179:24 0 30G 0 disk <--- SD card
>
> root@rcar-gen3:~# time blkdiscard /dev/mmcblk0
> real 0m8.659s
> user 0m0.001s
> sys 0m1.920s
>
> root@rcar-gen3:~# time blkdiscard /dev/mmcblk1
> real 0m1.176s
> user 0m0.001s
> sys 0m0.124s
>
> [1] https://lore.kernel.org/linux-renesas-soc/20191112134808.23546-1-erosca@de.adit-jv.com/
>
> Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Andrew Gabbasov <andrew_gabbasov@mentor.com>
> Originally-by: Harish Jenny K N <harish_kandiga@mentor.com>
> Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
> Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/tmio_mmc_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index 9b6e1001e77c..dec5a99f52cf 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -1184,7 +1184,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
> if (ret == -EPROBE_DEFER)
> return ret;
>
> - mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
> + mmc->caps |= MMC_CAP_ERASE | MMC_CAP_4_BIT_DATA | pdata->capabilities;
> mmc->caps2 |= pdata->capabilities2;
> mmc->max_segs = pdata->max_segs ? : 32;
> mmc->max_blk_size = TMIO_MAX_BLK_SIZE;
> --
> 2.24.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-18 9:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 13:44 [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests Eugeniu Rosca
2019-11-15 13:51 ` Wolfram Sang
2019-11-18 9:08 ` Ulf Hansson
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).