Skip to content

Commit 801b839

Browse files
ChaotianJingHaibo Chen
authored andcommitted
mmc: mmc: fix switch timeout issue caused by jiffies precision
with CONFIG_HZ=100, the precision of jiffies is 10ms, and the generic_cmd6_time of some card is also 10ms. then, may be current time is only 5ms, but already timed out caused by jiffies precision. Signed-off-by: Chaotian Jing <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> (cherry picked from commit 8bcce64faaaf07165453e6600ae9ffb887e79b1a) Signed-off-by: Haibo Chen <[email protected]> (cherry picked from commit 38f639884a2cfd65cbe29ac2fbfe4ab3fcb1f1af)
1 parent 38ed99e commit 801b839

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mmc/core/mmc_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
549549
timeout_ms = MMC_OPS_TIMEOUT_MS;
550550

551551
/* Must check status to be sure of no errors. */
552-
timeout = jiffies + msecs_to_jiffies(timeout_ms);
552+
timeout = jiffies + msecs_to_jiffies(timeout_ms) + 1;
553553
do {
554554
if (send_status) {
555555
/*

0 commit comments

Comments
 (0)