lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mmc: block: enable cache-flushing when mmc cache is on
From
On 14/03/2022 09:26, Avri Altman wrote:
> Hi,
>> The mmc core enable cache on default. But it only enables cache-flushing
>> when host supports cmd23 and eMMC supports reliable write.
>> For hosts which do not support cmd23 or eMMCs which do not support
>> reliable write, the cache can not be flushed by `sync` command.
>> This may leads to cache data lost.
>> This patch enables cache-flushing as long as cache is enabled, no matter host
>> supports cmd23 and/or eMMC supports reliable write or not.
> I looked in the spec and indeed couldn't find why enabling cache is dependent of cmd23/reliable write.
> Nor I was able to find the original commit log.

Reliable write was added first, so it might have been an oversight:

commit 881d1c25f765938a95def5afe39486ce39f9fc96
Author: Seungwon Jeon <tgih.jun@samsung.com>
Date: Fri Oct 14 14:03:21 2011 +0900

mmc: core: Add cache control for eMMC4.5 device

This patch adds cache feature of eMMC4.5 Spec.
If device supports cache capability, host can utilize some specific
operations.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>



>
> Please allow few days to ask internally.
>
> Thanks,
> Avri

\
 
 \ /
  Last update: 2022-03-14 11:33    [W:0.141 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site