Re: [PATCH 1/4] mmc: core: add high-capacity erase size capability flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/02/12 00:38, Linus Walleij wrote:
> On Tue, Feb 7, 2012 at 1:48 PM, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote:
> 
>> Let drivers specify the use of high-capacity erase size.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> (...)
>> @@ -949,7 +949,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>>         * If enhanced_area_en is TRUE, host needs to enable ERASE_GRP_DEF
>>         * bit.  This bit will be lost every time after a reset or power off.
>>         */
>> -       if (card->ext_csd.enhanced_area_en) {
>> +       if (card->ext_csd.enhanced_area_en ||
>> +           (card->ext_csd.rev >= 3 && (host->caps2 & MMC_CAP2_HC_ERASE_SZ))) {
> 
> It looks like there is a bug fix hidden inside this patch, is it not?
> The comparison for card->ext_csd.rev >= 3 was not there before,
> and looks like it's fixing something and should go into stable even,
> is that correct?

No because because enhanced areas were added in v4.4 so
"card->ext_csd.enhanced_area_en" implies "card->ext_csd.rev >= 4"

High-capacity erase size was added in v4.3 so "card->ext_csd.rev >= 3"
is parenthesised with "(host->caps2 & MMC_CAP2_HC_ERASE_SZ)"
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux