From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDC3FCA9EAF for ; Sun, 27 Oct 2019 21:28:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B65962064A for ; Sun, 27 Oct 2019 21:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211682; bh=l0pchxFYAHhyUv0q79nwe2Ng0yEf+Cg2EzxFV4FdCZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FqUJnSeBI1sVtRw6vTLhSktSL7McU45grvPiy/apt100N2LRQ3xVknyO6IbTAhFaA ybCtfIeiPA0btyMT9DMGOI471N23Oq7mT+24/mrjWDQ43RBPeG7eATmSEw0RlOPtBn MAnG5/lylPEMToKIFdxbxladbNr5G+QHVaRGLoeA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728744AbfJ0VXd (ORCPT ); Sun, 27 Oct 2019 17:23:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:44682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732355AbfJ0VX3 (ORCPT ); Sun, 27 Oct 2019 17:23:29 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3F27A214E0; Sun, 27 Oct 2019 21:23:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211408; bh=l0pchxFYAHhyUv0q79nwe2Ng0yEf+Cg2EzxFV4FdCZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iNCOP68UvMKi6KcsvY24SaqIh1paPYv3fLDlnyjoyMBoFS+VFV8cOFsm8YieVchU2 gkLUScIQvLlXBv1B9MKazQpbov3PzPpxjvg11vvlBPSnAszFL0+1b2x/tRv9gs3D91 v3Zq0c5GZ9mVpn2qd43NTcsbjm1mCvVbPCxTr7z8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Faiz Abbas , Adrian Hunter , Ulf Hansson Subject: [PATCH 5.3 142/197] mmc: cqhci: Commit descriptors before setting the doorbell Date: Sun, 27 Oct 2019 22:01:00 +0100 Message-Id: <20191027203359.367516888@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Faiz Abbas commit c07d0073b9ec80a139d07ebf78e9c30d2a28279e upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/cqhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/cqhci.c +++ b/drivers/mmc/host/cqhci.c @@ -611,7 +611,8 @@ static int cqhci_request(struct mmc_host 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",