Skip to content

Commit 045d705

Browse files
wangbaolin719storulf
authored andcommitted
mmc: core: Enable the MMC host software queue for the SD card
Enable the MMC host software queue for the SD card if the host controller supports the MMC host software queue. On my Spreadtrum platform, I did not see any obvious performance changes in 4K block size when changing to use hsq for the SD cards, I think the reason is the SD card works at a low speed on my platform, and most of time is spent in the hardware. But we can see some obvious improvements when enabling the packed request based on hsq, that's why we still add hsq support for the SD cards. Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Baolin Wang <[email protected]> Link: https://lore.kernel.org/r/0065b4631fef2d61c3b89d14a4ea4f2b7499ea56.1581478568.git.baolin.wang7@gmail.com Signed-off-by: Ulf Hansson <[email protected]>
1 parent 511ce37 commit 045d705

File tree

1 file changed

+10
-0
lines changed
  • drivers/mmc/core

1 file changed

+10
-0
lines changed

drivers/mmc/core/sd.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,16 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
10821082
}
10831083
}
10841084

1085+
if (host->cqe_ops && !host->cqe_enabled) {
1086+
err = host->cqe_ops->cqe_enable(host, card);
1087+
if (!err) {
1088+
host->cqe_enabled = true;
1089+
host->hsq_enabled = true;
1090+
pr_info("%s: Host Software Queue enabled\n",
1091+
mmc_hostname(host));
1092+
}
1093+
}
1094+
10851095
if (host->caps2 & MMC_CAP2_AVOID_3_3V &&
10861096
host->ios.signal_voltage == MMC_SIGNAL_VOLTAGE_330) {
10871097
pr_err("%s: Host failed to negotiate down from 3.3V\n",

0 commit comments

Comments
 (0)