Loading drivers/mmc/card/block.c +12 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,8 @@ struct mmc_blk_data { #define MMC_BLK_WRITE BIT(1) #define MMC_BLK_DISCARD BIT(2) #define MMC_BLK_SECDISCARD BIT(3) #define MMC_BLK_FLUSH BIT(4) /* * Only set in main mmc_blk_data associated Loading Loading @@ -1458,6 +1460,16 @@ static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) int ret = 0; ret = mmc_flush_cache(card); if (ret == -ENODEV) { pr_err("%s: %s: restart mmc card", req->rq_disk->disk_name, __func__); if (mmc_blk_reset(md, card->host, MMC_BLK_FLUSH)) pr_err("%s: %s: fail to restart mmc", req->rq_disk->disk_name, __func__); else mmc_blk_reset_success(md, MMC_BLK_FLUSH); } if (ret == -ETIMEDOUT) { pr_info("%s: %s: requeue flush request after timeout", req->rq_disk->disk_name, __func__); Loading drivers/mmc/core/core.c +3 −1 Original line number Diff line number Diff line Loading @@ -3600,9 +3600,11 @@ int mmc_flush_cache(struct mmc_card *card) pr_err("%s: cache flush timeout\n", mmc_hostname(card->host)); rc = mmc_interrupt_hpi(card); if (rc) if (rc) { pr_err("%s: mmc_interrupt_hpi() failed (%d)\n", mmc_hostname(host), rc); err = -ENODEV; } } else if (err) { pr_err("%s: cache flush error %d\n", mmc_hostname(card->host), err); Loading Loading
drivers/mmc/card/block.c +12 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,8 @@ struct mmc_blk_data { #define MMC_BLK_WRITE BIT(1) #define MMC_BLK_DISCARD BIT(2) #define MMC_BLK_SECDISCARD BIT(3) #define MMC_BLK_FLUSH BIT(4) /* * Only set in main mmc_blk_data associated Loading Loading @@ -1458,6 +1460,16 @@ static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) int ret = 0; ret = mmc_flush_cache(card); if (ret == -ENODEV) { pr_err("%s: %s: restart mmc card", req->rq_disk->disk_name, __func__); if (mmc_blk_reset(md, card->host, MMC_BLK_FLUSH)) pr_err("%s: %s: fail to restart mmc", req->rq_disk->disk_name, __func__); else mmc_blk_reset_success(md, MMC_BLK_FLUSH); } if (ret == -ETIMEDOUT) { pr_info("%s: %s: requeue flush request after timeout", req->rq_disk->disk_name, __func__); Loading
drivers/mmc/core/core.c +3 −1 Original line number Diff line number Diff line Loading @@ -3600,9 +3600,11 @@ int mmc_flush_cache(struct mmc_card *card) pr_err("%s: cache flush timeout\n", mmc_hostname(card->host)); rc = mmc_interrupt_hpi(card); if (rc) if (rc) { pr_err("%s: mmc_interrupt_hpi() failed (%d)\n", mmc_hostname(host), rc); err = -ENODEV; } } else if (err) { pr_err("%s: cache flush error %d\n", mmc_hostname(card->host), err); Loading