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

Commit a5eb2c93 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: block: support RPMB with CMDQ framework"

parents 2048a632 1be4e520
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -955,6 +955,8 @@ static int mmc_blk_cmdq_switch(struct mmc_card *card,
{
	int ret = 0;
	bool cmdq_mode = !!mmc_card_cmdq(card);
	struct mmc_host *host = card->host;
	struct mmc_cmdq_context_info *ctx = &host->cmdq_ctx;

	if (!(card->host->caps2 & MMC_CAP2_CMD_QUEUE) ||
	    !card->ext_csd.cmdq_support ||
@@ -969,6 +971,16 @@ static int mmc_blk_cmdq_switch(struct mmc_card *card,
			       __func__, ret, MMC_CARD_CMDQ_BLK_SIZE);
			goto out;
		}

	} else {
		if (!test_bit(CMDQ_STATE_HALT, &ctx->curr_state)) {
			ret = mmc_cmdq_halt(host, true);
			if (ret) {
				pr_err("%s: halt: failed: %d\n",
					mmc_hostname(host), ret);
				goto out;
			}
		}
	}

	ret = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static inline bool mmc_cmdq_should_pull_reqs(struct mmc_host *host,
{
	if (((req->cmd_flags & (REQ_FLUSH | REQ_DISCARD)) &&
			test_bit(CMDQ_STATE_DCMD_ACTIVE, &ctx->curr_state)) ||
			mmc_host_halt(host) ||
			(!host->card->part_curr && mmc_host_halt(host)) ||
			test_bit(CMDQ_STATE_ERR, &ctx->curr_state)) {
		pr_debug("%s: %s: skip pulling reqs: state: %lu\n",
			 mmc_hostname(host), __func__, ctx->curr_state);