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

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

Merge "mmc: cmdq_hci: Add a memory barrier before ringing doorbell"

parents 10c059f1 831a8bb3
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -593,8 +593,9 @@ static int cmdq_request(struct mmc_host *mmc, struct mmc_request *mrq)
	if (mrq->cmdq_req->cmdq_req_flags & DCMD) {
		cmdq_prep_dcmd_desc(mmc, mrq);
		cq_host->mrq_slot[DCMD_SLOT] = mrq;
		cmdq_writel(cq_host, 1 << DCMD_SLOT, CQTDBR);
		goto out;
		/* DCMD's are always issued on a fixed slot */
		tag = DCMD_SLOT;
		goto ring_doorbell;
	}

	if (cq_host->ops->crypto_cfg) {
@@ -625,7 +626,12 @@ static int cmdq_request(struct mmc_host *mmc, struct mmc_request *mrq)
	if (cq_host->ops->set_tranfer_params)
		cq_host->ops->set_tranfer_params(mmc);

ring_doorbell:
	/* Ensure the task descriptor list is flushed before ringing doorbell */
	wmb();
	cmdq_writel(cq_host, 1 << tag, CQTDBR);
	/* Commit the doorbell write immediately */
	wmb();

out:
	return err;