linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] mmc: block: Issue flush only if allowed
@ 2021-04-02  7:46 Avri Altman
  0 siblings, 0 replies; 3+ messages in thread
From: Avri Altman @ 2021-04-02  7:46 UTC (permalink / raw)
  To: adrian.hunter; +Cc: Avri Altman, bpeter, linux-kernel, linux-mmc, ulf.hansson

>> @@ -1473,6 +1473,9 @@ static int mmc_blk_cqe_issue_flush(struct mmc_queue *mq, struct request *req)
>>  	struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req);
>>  	struct mmc_request *mrq = mmc_blk_cqe_prep_dcmd(mqrq, req);
>>  
>> +	if (mmc_card_mmc(mq->card) && !mmc_flush_allowed(mq->card))
>> +		return 0;

> Returning 0 means the flush was issued successfully. i.e. it is in
> flight.
>
> Instead, a call to blk_mq_end_request(req, BLK_STS_OK) is needed,
> and mmc_blk_mq_issue_rq() must be amended so that it will return
> MMC_REQ_DONE for this case.
Done.

Thanks,
Avri

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 0/2] Do not flush cache when it is disabled
@ 2021-03-22 13:36 Avri Altman
  2021-03-22 13:36 ` [PATCH 1/2] mmc: block: Issue flush only if allowed Avri Altman
  0 siblings, 1 reply; 3+ messages in thread
From: Avri Altman @ 2021-03-22 13:36 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc; +Cc: Adrian Hunter, linux-kernel, Avri Altman

Cache is a temporary storage space in an eMMC device. Volatile by
nature, the cache should in typical case reduce the access time compared
to an access to the main nonvolatile storage.

The cache function can be turned ON and OFF. Once OFF, the host is not
expected to issue a flush-cache command to the device.


Avri Altman (2):
  mmc: block: Issue flush only if allowed
  mmc: block: Update ext_csd.cache_ctrl if it was written

 drivers/mmc/core/block.c   | 11 +++++++++++
 drivers/mmc/core/mmc_ops.c |  4 +---
 drivers/mmc/core/mmc_ops.h |  5 +++++
 3 files changed, 17 insertions(+), 3 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-02  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-02  7:46 [PATCH 1/2] mmc: block: Issue flush only if allowed Avri Altman
  -- strict thread matches above, loose matches on Subject: below --
2021-03-22 13:36 [PATCH 0/2] Do not flush cache when it is disabled Avri Altman
2021-03-22 13:36 ` [PATCH 1/2] mmc: block: Issue flush only if allowed Avri Altman
2021-03-22 18:00   ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).