From patchwork Thu Apr 16 13:22:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 227591 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=ham 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 1A0B2C2BB55 for ; Thu, 16 Apr 2020 15:39:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E25F1214AF for ; Thu, 16 Apr 2020 15:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587051548; bh=sRsf7xacDSWIjD5VxmR6mRyFX8pNfQp0G4me/WzHu8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PDW4mB5oVKGvAI2VRPgNPEqJBZbcVKHAibKVrCg1YlexuUZM0SHimPocoeRWlDcGC RidHgyMngHP9lwHrTihcAwCQ7cvCp62ar/BR0TtCTComoZiw3NHdWR9oGy2v2LwDvp 95ZrrH3ULMqBGeoLqbtznEy1EEe6uTkVJ4CTN4dU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395451AbgDPPjG (ORCPT ); Thu, 16 Apr 2020 11:39:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:50914 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2897698AbgDPNi3 (ORCPT ); Thu, 16 Apr 2020 09:38:29 -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 4F16C21BE5; Thu, 16 Apr 2020 13:38:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044308; bh=sRsf7xacDSWIjD5VxmR6mRyFX8pNfQp0G4me/WzHu8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=imYKCNqYQ60fHfpp+w4R/nea+bmYQIPFuIU4Tbz2Tkrnvx7FctqMwXMsRpyUzqkeC a1jivCUoQsEiP9Xfwrb6n23+hB38ArhjUbhA91QdehfVxafscUWpxSjid8Q/4rRCN7 obicWkx1XHq2XMqHqJCfIDCP5FvgoCgKKyGjHq/A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ludovic Barre , Ulf Hansson Subject: [PATCH 5.5 124/257] mmc: mmci_sdmmc: Fix clear busyd0end irq flag Date: Thu, 16 Apr 2020 15:22:55 +0200 Message-Id: <20200416131341.833005005@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131325.891903893@linuxfoundation.org> References: <20200416131325.891903893@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ludovic Barre commit d4a384cb563e555ce00255f5f496b503e6cc6358 upstream. The busyd0 line transition can be very fast. The busy request may be completed by busy_d0end, without waiting for the busy_d0 steps. Therefore, clear the busyd0end irq flag, even if no busy_status. Fixes: 0e68de6aa7b1 ("mmc: mmci: sdmmc: add busy_complete callback") Cc: stable@vger.kernel.org Signed-off-by: Ludovic Barre Link: https://lore.kernel.org/r/20200325143409.13005-2-ludovic.barre@st.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/mmci_stm32_sdmmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/mmc/host/mmci_stm32_sdmmc.c +++ b/drivers/mmc/host/mmci_stm32_sdmmc.c @@ -315,11 +315,11 @@ complete: if (host->busy_status) { writel_relaxed(mask & ~host->variant->busy_detect_mask, base + MMCIMASK0); - writel_relaxed(host->variant->busy_detect_mask, - base + MMCICLEAR); host->busy_status = 0; } + writel_relaxed(host->variant->busy_detect_mask, base + MMCICLEAR); + return true; }