Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp10330ybm; Mon, 20 May 2019 10:57:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxX0Xqx+WFDgkxurnE6TlbOt8/OltCDIsnfqOknOfrQJQwuwsgSZLpv83ZnLFMPQBX90ugX X-Received: by 2002:aa7:92da:: with SMTP id k26mr36774584pfa.70.1558375069530; Mon, 20 May 2019 10:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558375069; cv=none; d=google.com; s=arc-20160816; b=ToXJEtuFieIot0opWaBQIEuK2O13PzPg+X9ssi3q6K0NZxrygS5xI9if7gS5ImFq8y 6WjVnzZrLt0Zm/HInEi11QTdC6ZBikdxT8WPWjvzOtizKohWlSdiLF9dV5ePG/OyB7LP Q7G0cX96IXKjPDnxWYuYsNObQ5enMWet2vLVT76rVqsZ+EFp/CX/bYHDDdX/hIRhdVSY zyRPssuTB8mCMQps5naQroELDQ87GybxKUFq/I69Jh52DPc/LkFAbtXebxmWLVNB6c2T HHpwElKm1Xyr3NnCH6PnZuFvqyhnrUehaYpVGItzTjNVtXF77ErPGVGqWkogZWKdR6gt e13w== 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=D/2xg0KJe4Lh37rxbsHH5ICfc8NcDIcA+9U1hrehkyo=; b=VBnX6uMHEOMOad9xDOSBDGF8RE6gVLJ3SbHltj+WPX5iYYBzklUWcDk+SFodVedFbT 4/2+OaPAtDQXe1Nj7Bbk80EjhpP9vRUaZEVBdJCAKTshi7eO7OUiV5p0TKTF3a1kaucf PfcQWjrqe1uIIZG6k3u8mMIK5aO19PeS6OVzYfmQOB0/Py92BfsPr2nJK6uwgBH4h5vn 2voN+Tzpo41RfzHoSW2zBzRa+b5w78jXfW1RwBOHHEqXXGOoeaE0Nb6EZbaqe+Ee5O3c 3poczvClJpSeYJk06sl6U4hyYl+jfYpOXDM2ZC0GUWLC7x1cMnkVv0OVx/Nyt0qhB/mH +DQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=muz36mvP; 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 f7si19497308plm.427.2019.05.20.10.57.34; Mon, 20 May 2019 10:57:49 -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=muz36mvP; 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 S2388938AbfETMs7 (ORCPT + 99 others); Mon, 20 May 2019 08:48:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:36106 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387576AbfETMWK (ORCPT ); Mon, 20 May 2019 08:22:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 797A4213F2; Mon, 20 May 2019 12:22:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558354930; bh=+haWhBeLMgW5hj6mugJTA23hdoTpHOeeUglrpzTFYug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=muz36mvP3VC7AHktTCBCLQf1lj2BGkwUedhxz9kbduy1ESYqqyiR7UE5aNMQB+qor g2yZ5860keZFayKDpSnps8hrmTpIjaX6zDnkgloSat44RWW5b0bAmUU1IWbfEs7unN wC69HRpJHZlEiQNm4S+41CYbAetb6PzDV4VjjO+c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Muellner , Philipp Tomsich , Heiko Stuebner Subject: [PATCH 4.19 005/105] arm64: dts: rockchip: Disable DCMDs on RK3399s eMMC controller. Date: Mon, 20 May 2019 14:13:11 +0200 Message-Id: <20190520115247.424974813@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115247.060821231@linuxfoundation.org> References: <20190520115247.060821231@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: Christoph Muellner commit a3eec13b8fd2b9791a21fa16e38dfea8111579bf upstream. When using direct commands (DCMDs) on an RK3399, we get spurious CQE completion interrupts for the DCMD transaction slot (#31): [ 931.196520] ------------[ cut here ]------------ [ 931.201702] mmc1: cqhci: spurious TCN for tag 31 [ 931.206906] WARNING: CPU: 0 PID: 1433 at /usr/src/kernel/drivers/mmc/host/cqhci.c:725 cqhci_irq+0x2e4/0x490 [ 931.206909] Modules linked in: [ 931.206918] CPU: 0 PID: 1433 Comm: irq/29-mmc1 Not tainted 4.19.8-rt6-funkadelic #1 [ 931.206920] Hardware name: Theobroma Systems RK3399-Q7 SoM (DT) [ 931.206924] pstate: 40000005 (nZcv daif -PAN -UAO) [ 931.206927] pc : cqhci_irq+0x2e4/0x490 [ 931.206931] lr : cqhci_irq+0x2e4/0x490 [ 931.206933] sp : ffff00000e54bc80 [ 931.206934] x29: ffff00000e54bc80 x28: 0000000000000000 [ 931.206939] x27: 0000000000000001 x26: ffff000008f217e8 [ 931.206944] x25: ffff8000f02ef030 x24: ffff0000091417b0 [ 931.206948] x23: ffff0000090aa000 x22: ffff8000f008b000 [ 931.206953] x21: 0000000000000002 x20: 000000000000001f [ 931.206957] x19: ffff8000f02ef018 x18: ffffffffffffffff [ 931.206961] x17: 0000000000000000 x16: 0000000000000000 [ 931.206966] x15: ffff0000090aa6c8 x14: 0720072007200720 [ 931.206970] x13: 0720072007200720 x12: 0720072007200720 [ 931.206975] x11: 0720072007200720 x10: 0720072007200720 [ 931.206980] x9 : 0720072007200720 x8 : 0720072007200720 [ 931.206984] x7 : 0720073107330720 x6 : 00000000000005a0 [ 931.206988] x5 : ffff00000860d4b0 x4 : 0000000000000000 [ 931.206993] x3 : 0000000000000001 x2 : 0000000000000001 [ 931.206997] x1 : 1bde3a91b0d4d900 x0 : 0000000000000000 [ 931.207001] Call trace: [ 931.207005] cqhci_irq+0x2e4/0x490 [ 931.207009] sdhci_arasan_cqhci_irq+0x5c/0x90 [ 931.207013] sdhci_irq+0x98/0x930 [ 931.207019] irq_forced_thread_fn+0x2c/0xa0 [ 931.207023] irq_thread+0x114/0x1c0 [ 931.207027] kthread+0x128/0x130 [ 931.207032] ret_from_fork+0x10/0x20 [ 931.207035] ---[ end trace 0000000000000002 ]--- The driver shows this message only for the first spurious interrupt by using WARN_ONCE(). Changing this to WARN() shows, that this is happening quite frequently (up to once a second). Since the eMMC 5.1 specification, where CQE and CQHCI are specified, does not mention that spurious TCN interrupts for DCMDs can be simply ignored, we must assume that using this feature is not working reliably. The current implementation uses DCMD for REQ_OP_FLUSH only, and I could not see any performance/power impact when disabling this optional feature for RK3399. Therefore this patch disables DCMDs for RK3399. Signed-off-by: Christoph Muellner Signed-off-by: Philipp Tomsich Fixes: 84362d79f436 ("mmc: sdhci-of-arasan: Add CQHCI support for arasan,sdhci-5.1") Cc: stable@vger.kernel.org [the corresponding code changes are queued for 5.2 so doing that as well] Signed-off-by: Heiko Stuebner Signed-off-by: Greg Kroah-Hartman --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 + 1 file changed, 1 insertion(+) --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -305,6 +305,7 @@ phys = <&emmc_phy>; phy-names = "phy_arasan"; power-domains = <&power RK3399_PD_EMMC>; + disable-cqe-dcmd; status = "disabled"; };