lkml.org 
[lkml]   [2015]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mmc: print message if a card supports secure erase/trim
On 01/27/15 12:48, Alexander Holler wrote:
> It's an interesting detail, so inform the user about it.
>
> Signed-off-by: Alexander Holler<holler@ahsoftware.de>
> ---
> drivers/mmc/core/bus.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 8a1f124..4a60028 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -347,6 +347,10 @@ int mmc_add_card(struct mmc_card *card)
> uhs_bus_speed_mode, type, card->rca);
> }
>
> + if (mmc_can_secure_erase_trim(card))
> + pr_info("%s: card supports secure erase/trim\n",
> + mmc_hostname(card->host));
> +

If you want to expose this info you could also consider doing it in the
debugfs folder that is created below.

> #ifdef CONFIG_DEBUG_FS
> mmc_add_card_debugfs(card);
> #endif

Regards,
Arend

[1] http://lxr.free-electrons.com/ident?i=mmc_add_card_debugfs


\
 
 \ /
  Last update: 2015-01-27 13:41    [W:0.466 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site