Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ef153af authored by Konstantin Dorfman's avatar Konstantin Dorfman
Browse files

mmc: print an error on FLUSH timeout



Up until now the FLUSH timeout error was not printed and there
was no way to know if the FLUSH completed successfully or not.
Printing the FLUSH failure will help to identify if FS corruption
happened due to this timeout.

Change-Id: I352423c84e2ca698284b90af5837ba96d03919bf
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent 568a7d3d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1406,8 +1406,11 @@ static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req)
	int ret = 0;

	ret = mmc_flush_cache(card);
	if (ret)
	if (ret) {
		pr_err("%s: %s: notify flush error to upper layers",
				req->rq_disk->disk_name, __func__);
		ret = -EIO;
	}

	blk_end_request_all(req, ret);

+1 −1
Original line number Diff line number Diff line
@@ -3496,7 +3496,7 @@ int mmc_flush_cache(struct mmc_card *card)
						EXT_CSD_FLUSH_CACHE, 1,
						MMC_FLUSH_REQ_TIMEOUT_MS);
		if (err == -ETIMEDOUT) {
			pr_debug("%s: cache flush timeout\n",
			pr_err("%s: cache flush timeout\n",
					mmc_hostname(card->host));
			rc = mmc_interrupt_hpi(card);
			if (rc)