Re: [PATCH v2] mmc: tmio: Add MMC_CAP_ERASE to allow erase/discard/trim requests

From: Wolfram Sang
Date: Fri Nov 15 2019 - 08:51:52 EST


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@xxxxxxxxxxxxxx/
>
> Cc: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> Cc: Andrew Gabbasov <andrew_gabbasov@xxxxxxxxxx>
> Originally-by: Harish Jenny K N <harish_kandiga@xxxxxxxxxx>
> Suggested-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> Signed-off-by: Eugeniu Rosca <erosca@xxxxxxxxxxxxxx>

Reviewed-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature