From patchwork Tue Oct 18 03:57:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 13009852 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7A77DC433FE for ; Tue, 18 Oct 2022 03:59:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=gIz2LpNWHmyk/G62JtAyBK1DpfP+VtUk4QZ3U0QrNDQ=; b=QdIKDE0k7CV+Vb ccFIfM7EXXC9rhqIBmYnZvoifR1DwNZ3OG37i108/I/46qKko/AnhgoJl9cqQ79gY8KWGJEfBXfoF 07W3vP+RPfq80u2hsjbnTQekeKCHLiYVAS3WbLA2tjWo31dkAVfvT6CgNLt1QGsEys1tPtnNGHfkt eRKj4gmii+vjdIe1LtzO7VLY767mRuLCBrC0tVgYOSLFZ/A88sT4f9ZT0B9J8YGvN8me9j/DvLtXJ fOXu/qsAZV95aiyvoqV6BrbToO9ZlYEy5GsZPG6XW88itH60I5PS1cBn/vbZsVZfTVBEnzTvm8kip /Bv8jG3M1mLBJm8x1b2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1okdjZ-002BB3-QP; Tue, 18 Oct 2022 03:57:41 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1okdjW-002B9E-R4 for linux-arm-kernel@lists.infradead.org; Tue, 18 Oct 2022 03:57:40 +0000 Received: by mail-pl1-x62f.google.com with SMTP id i6so12622140pli.12 for ; Mon, 17 Oct 2022 20:57:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ttn9BtsRvPHZDctoQFYhqchv6f4WZOW0AdvCedAYGAQ=; b=AxoTvulQsXHyVthGzQJijYlWVIHRm2hUNQK040FlpeeFvQfV2Fvgv53nLi9MQeFpC5 W7LFWCpzSLU8uOaqCg3PaGdrVYGk2e45mCqzVkiUVsvgpJJWHBZXv+8xyrtBsCbemUNX UpMYHFkZZ11zxyfkIYH+H7UVa8lDBE+rdIoow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ttn9BtsRvPHZDctoQFYhqchv6f4WZOW0AdvCedAYGAQ=; b=RY5FO1jqpu3z1NItZlmpY/P8PvaT7YjZfX/adhEVuPZuRmAd00meI0YmPYrNndCDxx LKE/AVCRRiF4drBNFe44+swQXrtA1EvA01SsUJXu8vS8nEXGtvrtC7T2LSW3kw5IPhPT 7dK0vcjZc2aU6tIl/X1ke3xyiogzFUjdjDE4SHKDAjklbkW18mO2hqwBjrmGklCaftK0 zb5cTtyKMgm6SzR45wgr9rFUDt54unS9xRbRudFBD3+/v3NgnWW6hMacJdydCKlJV2zg J8LeJW2UNBEp+AS/8N08LNVgi7u1dow1fX5QlitRJ9cXYln8s5gUlfuI22Dj5q15apTq uWHg== X-Gm-Message-State: ACrzQf0I30uatz4MHaGADvUUKZON2nRp8SmIUGCbcRMijYHhkT5offfS Tv42jGWUhNqnQy/6dBFd9aZSyQ== X-Google-Smtp-Source: AMsMyM5/MMsR3dKwAlnXsP26b3+7tHkvjjlj4iiVTtsPTtcIH0lwoZsn74D8o17KJH1w3ZfKQ3PUHg== X-Received: by 2002:a17:902:f549:b0:185:3b98:380f with SMTP id h9-20020a170902f54900b001853b98380fmr1074842plf.36.1666065456717; Mon, 17 Oct 2022 20:57:36 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:2ac3:f4e2:e908:c393]) by smtp.gmail.com with UTF8SMTPSA id d9-20020a170902654900b00182305a787fsm7418748pln.62.2022.10.17.20.57.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Oct 2022 20:57:36 -0700 (PDT) From: Brian Norris To: Ulf Hansson Cc: Shawn Lin , Adrian Hunter , Shawn Guo , Fabio Estevam , Faiz Abbas , NXP Linux Team , Haibo Chen , Al Cooper , linux-mmc@vger.kernel.org, Pengutronix Kernel Team , linux-kernel@vger.kernel.org, Florian Fainelli , Sascha Hauer , Thierry Reding , Michal Simek , Jonathan Hunter , Sowjanya Komatineni , linux-arm-kernel@lists.infradead.org, Broadcom internal kernel review list , Brian Norris Subject: [PATCH 0/5] mmc: sdhci controllers: Fix SDHCI_RESET_ALL for CQHCI Date: Mon, 17 Oct 2022 20:57:19 -0700 Message-Id: <20221018035724.2061127-1-briannorris@chromium.org> X-Mailer: git-send-email 2.38.0.413.g74048e4d9e-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221017_205738_916042_89E3DD2D X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a series of nearly identical fixes for several SDHCI host drivers. The first patch (for sdhci-of-arasan) is the only one I've tested, and I wrote it due to a bug described there. I then noticed that several other drivers do the same thing, and that commit df57d73276b8 ("mmc: sdhci-pci: Fix SDHCI_RESET_ALL for CQHCI for Intel GLK-based controllers") points out the likely-repeated bug. Thus, I include additional patches (compile-tested only) that apply similar fixes to the other drivers which call cqhci_init() but not cqhci_deactivate(). They contain appropriate disclaimers and the relevant parties are CC'd. I would suggest only merging them if you get some kind of ACK from people familiar with the relevant hardware. Notably, I do *not* patch drivers/mmc/host/mtk-sd.c although it uses CQHCI, because it doesn't seem to be an SDHCI-based controller, and so even if it has a similar bug, it's not clear to me how to patch it. - Brian Brian Norris (5): mmc: sdhci-of-arasan: Fix SDHCI_RESET_ALL for CQHCI mmc: sdhci-brcmstb: Fix SDHCI_RESET_ALL for CQHCI mms: sdhci-esdhc-imx: Fix SDHCI_RESET_ALL for CQHCI mmc: sdhci-tegra: Fix SDHCI_RESET_ALL for CQHCI mmc: sdhci_am654: Fix SDHCI_RESET_ALL for CQHCI drivers/mmc/host/sdhci-brcmstb.c | 7 ++++++- drivers/mmc/host/sdhci-esdhc-imx.c | 7 +++++++ drivers/mmc/host/sdhci-of-arasan.c | 17 +++++++++++------ drivers/mmc/host/sdhci-tegra.c | 4 ++++ drivers/mmc/host/sdhci_am654.c | 3 +++ 5 files changed, 31 insertions(+), 7 deletions(-)