From patchwork Thu Aug 29 06:18:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seunghwan Baek X-Patchwork-Id: 823790 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C6FD158A13 for ; Thu, 29 Aug 2024 06:18:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724912331; cv=none; b=BzroGqrEL6HjRfQhYFVTrEX+Po8RMXdQ1zYoZYOsVNEst1QPr5HsQGnf13UBzcikpTbATvQfv2DE/BO1HoPjld6V9ACZwnYAqaM8kXFwCWkr6dv2milJA+YdxiVV+oNMoMWtcq37gO6Wyol8pxKjPuukpQAZ9w4hmRKEZ/y6q2E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724912331; c=relaxed/simple; bh=ON2KdJqCjfOJ6h/0KCc/uwlLMP9C6/PHlN3zCR1uQbM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:Content-Type: References; b=MIRWiDScoeDeOTZCofVQB/+YPHfjA3xvTj9dEe91AJN0lC+o7LFnETytkOLkspWkFxpUJHyZQA9qIg2cVAwC/pPD5w9wD2pAcNkbhbFfwsTOw6RKndMSyUO+a7WRXldmYWPtUmbXCAYpmgGEX4JVjPSpHHp4cO1xVaE/PhUC6oY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=ebrsS3p+; arc=none smtp.client-ip=203.254.224.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="ebrsS3p+" Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20240829061842epoutp045842fdc07a2b1a8ff9dfeb159dcb56ac~wHp44MW-U2307623076epoutp04M for ; Thu, 29 Aug 2024 06:18:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20240829061842epoutp045842fdc07a2b1a8ff9dfeb159dcb56ac~wHp44MW-U2307623076epoutp04M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1724912322; bh=wzxQZoT4E2amf/9RHfF7VilfQ3lQHIJbyWrsBbwl7K0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ebrsS3p+gn3wXivxoxQlzqKcuZ9z5uMOt2NFZtH8BhGNnI6aWLcIo1uk9p1r9KgfI 1bY8avBS2wF8Mahvnjc6qIGq6JD1vs2B9PLWLOi1LK89yrMmZEMfBBGyRTfnZhroUt lSwuSjG7z6jhdlTLvqheuf4sS1Bc9W1OHhi7m2NU= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20240829061841epcas1p46c8a01a709b940ec49c39116267058ae~wHp4SCFrU0905209052epcas1p4o; Thu, 29 Aug 2024 06:18:41 +0000 (GMT) Received: from epsmgec1p1-new.samsung.com (unknown [182.195.38.241]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4WvWLn18Ysz4x9Q6; Thu, 29 Aug 2024 06:18:41 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmgec1p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 44.DA.19509.1C210D66; Thu, 29 Aug 2024 15:18:41 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20240829061840epcas1p4ceeaea9b00a34cae0c2e82652be0d0ee~wHp3eZAvj1419814198epcas1p4a; Thu, 29 Aug 2024 06:18:40 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240829061840epsmtrp1299267cdd5240786f5fce0c3e413f8be~wHp3da2ei0803708037epsmtrp11; Thu, 29 Aug 2024 06:18:40 +0000 (GMT) X-AuditID: b6c32a4c-17bc070000004c35-b7-66d012c17f0a Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 56.05.07567.0C210D66; Thu, 29 Aug 2024 15:18:40 +0900 (KST) Received: from localhost.localdomain (unknown [10.253.98.171]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240829061840epsmtip247e5235c17c6704249fee056562bc10c~wHp3Nc-a42307423074epsmtip2J; Thu, 29 Aug 2024 06:18:40 +0000 (GMT) From: Seunghwan Baek To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, ulf.hansson@linaro.org, ritesh.list@gmail.com, quic_asutoshd@quicinc.com, adrian.hunter@intel.com Cc: grant.jung@samsung.com, jt77.jang@samsung.com, junwoo80.lee@samsung.com, dh0421.hwang@samsung.com, jangsub.yi@samsung.com, sh043.lee@samsung.com, cw9316.lee@samsung.com, sh8267.baek@samsung.com, wkon.kim@samsung.com, stable@vger.kernel.org Subject: [PATCH v2 1/2] mmc: cqhci: Fix checking of CQHCI_HALT state Date: Thu, 29 Aug 2024 15:18:22 +0900 Message-Id: <20240829061823.3718-2-sh8267.baek@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240829061823.3718-1-sh8267.baek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnk+LIzCtJLcpLzFFi42LZdlhTX/eg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mOzvXtXQ2iUWeXmiYo2/iIbXBYe6xhhn/p6a0b+O0qMk9dzfbaq3ZwiRJD 5NElSzZO7tktfGCiEktxRqKhFnNRcSIAmDF9H9sCAAA= X-CMS-MailID: 20240829061840epcas1p4ceeaea9b00a34cae0c2e82652be0d0ee X-Msg-Generator: CA CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240829061840epcas1p4ceeaea9b00a34cae0c2e82652be0d0ee References: <20240829061823.3718-1-sh8267.baek@samsung.com> Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: To check if mmc cqe is in halt state, need to check set/clear of CQHCI_HALT bit. At this time, we need to check with &, not &&. Fixes: a4080225f51d ("mmc: cqhci: support for command queue enabled host") Cc: stable@vger.kernel.org Signed-off-by: Seunghwan Baek Acked-by: Adrian Hunter --- drivers/mmc/host/cqhci-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c index c14d7251d0bb..a02da26a1efd 100644 --- a/drivers/mmc/host/cqhci-core.c +++ b/drivers/mmc/host/cqhci-core.c @@ -617,7 +617,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq) cqhci_writel(cq_host, 0, CQHCI_CTL); mmc->cqe_on = true; pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc)); - if (cqhci_readl(cq_host, CQHCI_CTL) && CQHCI_HALT) { + if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT) { pr_err("%s: cqhci: CQE failed to exit halt state\n", mmc_hostname(mmc)); }