Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2252045ybg; Sun, 27 Oct 2019 14:25:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzShrk5yLdcHq8csgyIarcTAMzVjn6zdRvtKR9VzW/7q6AZOSDXLKkYtUtxWy9aO5p3e9gM X-Received: by 2002:a17:906:118d:: with SMTP id n13mr13357875eja.229.1572211530337; Sun, 27 Oct 2019 14:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572211530; cv=none; d=google.com; s=arc-20160816; b=rb1+sr34TvYB4CtoQ0HQKoWFjWVfECLQWMaimdSBuN1oJ5DWIbygBY7QL2Hy9Wnh5D L5MaGO2DH4xgvSCB/mAMg4JSPplpJQjBYD5IYsZgcXeJzo7ZqAo4VupG8PGxwQ8jENl2 Rsv4fhXRIxVp9TJg5ntAzVyxh42BB9ERbaaGcQAgawZMe0xej9j7d7wpnUfXqlfQd77N P4lDe1fm/R4VEmp7Z3xFxiqWD1LJv/5qmyAk57x9+IAj8Yy0bDklPqemoriVBy1ZasMu YENG0bqFD427aI89gM+6YwooUO5jnynUDM5QsTKEIQCLubxUi0d8Wkjn+QHbbogH+M/M zbyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DGan6hZkzFOOZohL8O1I6YkCbDhQJazSv0MYKCBrHvY=; b=jxMILbC3oeqpgiZzlLV70Qd8scP5LzEqpV4rbx3X1n+QKUvsDXTe57W2mFrFDjyFHo vuHa8x9P/PMylTeX8DvswUmSME2duYvxl2ii36MVF6vQqKFHaEYJZqJ+3LOH5RCft0QF D2KwNAp5AjP/wu83hHBfX/2eIdaGOcuWG+5evI5ZKkoWSyqTiEfr9MQJuBF96n8YOEur 9z+yAVdQG3wqBf0ho6h3ebW2k3vvDYT5RH8xu2X63Cl8tM25x2Q7fvK+yFcLQHInwmYc Nr0UFGbArQsHgrI3uPOJargsiOn7OYj2OpUcLj61ua0LTzR+PdXET6xrluI+hYodHS1Z Tz5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iNCOP68U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d22si117265ejj.347.2019.10.27.14.25.05; Sun, 27 Oct 2019 14:25:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iNCOP68U; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732363AbfJ0VXe (ORCPT + 99 others); Sun, 27 Oct 2019 17:23:34 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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",