@@ -2242,6 +2242,14 @@ void mmc_rescan(struct work_struct *work)
if (freqs[i] <= host->f_min)
break;
}
+
+ /*
+ * Ignore the command timeout errors observed during
+ * the card init as those are excepted.
+ */
+
+ if (host && host->err_stats_enabled)
+ host->err_stats[MMC_ERR_CMD_TIMEOUT] = 0;
mmc_release_host(host);
out:
@@ -100,6 +100,9 @@ static enum blk_eh_timer_return mmc_cqe_timed_out(struct request *req)
enum mmc_issue_type issue_type = mmc_issue_type(mq, req);
bool recovery_needed = false;
+ if (host->err_stats_enabled)
+ mmc_debugfs_err_stats_inc(host, MMC_ERR_CMDQ_REQ_TIMEOUT);
+
switch (issue_type) {
case MMC_ISSUE_ASYNC:
case MMC_ISSUE_DCMD: