[PATCH] drivers: mmc: support secure erase.
Jaehoon Chung
jh80.chung at samsung.com
Tue Jan 5 00:44:30 CET 2021
Hi Dennis,
On 1/1/21 8:42 PM, dennis laplacian1 wrote:
> Hi Jaehoon.
> The only degradation is that the check will be for every block in the
> deleted range and not for the range.
> I can move the check to mmc_erase_t, but then if the device is not
> supporting secure erase the error message will be printed for every block.
> I can check the support also in mmc_berase and print an error message only
> in this function.
> What do you think?
I understood what you said. Your code is displaying "secure erase not supported..".
So it will be displayed spamming when card doesn't support secure erase.
In this case, your mention is right.
Well, if you're ok, it can be changed from printf to debug.
And I think that it can be located to mmc->sec_feature_support is assigned.
If it needs to know whether card is sec_feature_support or not, i think that it can be implemented into mmcinfo.
I don't think what's correct or wrong. :) It's just my preference.
Best Regards,
Jaehoon Chung
>
> בתאריך יום ב׳, 28 בדצמ׳ 2020 ב-0:39 מאת Jaehoon Chung <
> jh80.chung at samsung.com>:
>
>> Hi Dennis,
>>
>> On 12/26/20 5:44 PM, dennis laplacian1 wrote:
>>> Hi Jaehoon Chung,
>>> for your comment:
>>> "ditto. if (IS_ENABLED()) instead of #if.
>>> And i don't know why doesn't check this in mmc_erase_t().
>>> Then it doesn't need to pass arg as argument."
>>>
>>> I check the support of secure erase in the mmc_berase and not in
>>> mmc_erase_t because mmc_erase_t is called multiple times for each block.
>>> So to prevent unnecessary checks, I check the support in mmc_berase
>>> function.
>>
>> It there any problem to check a condition in mmc_erase_t()? or any
>> dramatic degradation?
>> And CONFIG_MMC_SECURE_ERASE is not enabled by default. So It doesn't need
>> to add a variable.
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>
>>
>
More information about the U-Boot
mailing list