lkml.org 
[lkml]   [2022]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH V2 1/2] mmc: block: Support Host to control FUA
Date
From: Wenchao Chen <wenchao.chen@unisoc.com>

This patch introduces host->fua_disable for MMC host controller.
The host can turn off FUA to improve performance.

Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
---
V1 -> V2
Address Chaitanyak's suggestions
Address Avri's suggestions
---
drivers/mmc/core/block.c | 3 ++-
include/linux/mmc/host.h | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 54cd009aee50..333e819e077a 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2490,7 +2490,8 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
((card->ext_csd.rel_param & EXT_CSD_WR_REL_PARAM_EN) ||
card->ext_csd.rel_sectors)) {
md->flags |= MMC_BLK_REL_WR;
- fua_enabled = true;
+ if (!card->host->fua_disable)
+ fua_enabled = true;
cache_enabled = true;
}
if (mmc_cache_enabled(card->host))
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 8fdd3cf971a3..16a5bee3eeae 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -517,6 +517,9 @@ struct mmc_host {
struct blk_crypto_profile crypto_profile;
#endif

+ /* Host FUA support */
+ bool fua_disable;
+
/* Host Software Queue support */
bool hsq_enabled;

--
2.17.1
\
 
 \ /
  Last update: 2022-10-21 09:31    [W:0.223 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site