From: Faiz Abbas Date: Mon, 14 Oct 2019 18:38:49 +0000 (+0530) Subject: mmc: cqhci: Commit descriptors before setting the doorbell X-Git-Tag: v5.4-rc5~25^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c07d0073b9ec80a139d07ebf78e9c30d2a28279e;p=platform%2Fkernel%2Flinux-rpi.git mmc: cqhci: Commit descriptors before setting the doorbell Add a write memory barrier to make sure that descriptors are actually written to memory, before ringing the doorbell. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c index f7bdae5..5047f73 100644 --- a/drivers/mmc/host/cqhci.c +++ b/drivers/mmc/host/cqhci.c @@ -611,7 +611,8 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) cq_host->slot[tag].flags = 0; cq_host->qcnt += 1; - + /* Make sure descriptors are ready before ringing the doorbell */ + wmb(); cqhci_writel(cq_host, 1 << tag, CQHCI_TDBR); if (!(cqhci_readl(cq_host, CQHCI_TDBR) & (1 << tag))) pr_debug("%s: cqhci: doorbell not set for tag %d\n",