From 0c86067ea8daf55a6a5b7f136bc930f71a2bdf76 Mon Sep 17 00:00:00 2001 From: Subhash Jadavani Date: Tue, 3 Nov 2015 19:03:41 -0800 Subject: mmc: block: ensure CMDQ is empty before queuing cache flush Some devices might stop responding to new commands if device cache flush is queued to host controller while host controller is still processing outstanding requests. To workaround this issue, we are making the cmdq thread to wait for all the oustanding requests to be finished before queuing cache flush command on host controller. Change-Id: I15387734f51ca4cadfc9e11270f14d8a0806a00f Signed-off-by: Subhash Jadavani [subhashj@codeaurora.org: fixed trivial merge conflicts] Signed-off-by: Subhash Jadavani --- include/linux/mmc/card.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 6fba3afcc2fb..2574e8af91fe 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h @@ -388,6 +388,9 @@ struct mmc_card { #define MMC_QUIRK_QCA9377_SETTINGS (1 << 16) /* QCA9377 card settings*/ +/* Make sure CMDQ is empty before queuing cache flush */ +#define MMC_QUIRK_CMDQ_EMPTY_BEFORE_FLUSH (1 << 17) + unsigned int erase_size; /* erase size in sectors */ unsigned int erase_shift; /* if erase unit is power 2 */ unsigned int pref_erase; /* in sectors */ -- cgit v1.2.3