From patchwork Thu Jan 7 22:15:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 12004989 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 6AD1AC433DB for ; Thu, 7 Jan 2021 22:17:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DCCA235FD for ; Thu, 7 Jan 2021 22:17:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DCCA235FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject: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=WE9dHPTriJE+UvSPtLcKi8iwhKOlf/0JCib5EQBvt+M=; b=XglhF9RMHQTY/I5IY0uCXz7vVs nt2GuO8+3JEdFkzdrczPdGd8L+dj4ANtZQcto8ZvqLkKXnuwDH0h4YQ63jMsCzeY2hTKiTcFE9jyf WMI7eaRMmdIwCBD42GrOV6uHCgiX4XUMAGe4wIfg7hvySq/zDN20SxppMCmtKYKaJFnXzjwWx0sbn lISUq1dYD/cH/nCnx+0Zk3/VjAMcPvudq+1OJJ/MB/GAYpTeLN9rp/A1lz9XP60Y6wTer0zR34Lve 4TCu4iQ+6vUgr5jWFvdC7Cmhtc4FguqpGzdNx8zUETkyUzxvnJuSGvuJemCfZEfnbgYxOoeCL2wqd 7bftZc3w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxdZ7-0006yt-0k; Thu, 07 Jan 2021 22:15:33 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxdZ5-0006yH-6f for linux-arm-kernel@lists.infradead.org; Thu, 07 Jan 2021 22:15:31 +0000 Received: by mail-pj1-x102f.google.com with SMTP id v1so2525780pjr.2 for ; Thu, 07 Jan 2021 14:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WZ0XBPw5rLkEDXHtBQzLvxXTmDU6S/SHITAFiBYK730=; b=jIHeiI1kVrjG+DCsMVsO1xFF9i3dWyRGCrWqXgK8nOdaIlVJdMOhl0Ks9tOp6CS73N zA07EaKb9XdM72SaymmJxFhJQzd/b0Lo3U5nO/RxjrJkELr4v7BX9LAQDjDb72EQuVOM tKMynD66ISR97gNCU9fC1ibpizz50EsjKLhPZR0HTn6YPYpFbUgVKmEV1C8W7f5V2Y2u 8/NLW1CnG+MS8i9fZzzRyp8I2b7glhILN8de0jl9ORkErQfDAOhTzy0X4gZgyEkY+LX0 eMpvrIjt/DQuNytAsDiJpIRfa00yDZQCI9pa6ub+5LsyHDiiI+w1Fe5w+K0bBBWmoC/5 wQYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WZ0XBPw5rLkEDXHtBQzLvxXTmDU6S/SHITAFiBYK730=; b=khMJzYpVc39TuH3LutQ0oo4E8Ca2LyaiJyR6CHHz38svDNtd9hPtpzy9b/TDb6CAV2 Qma7kvF/ci/a88zBMRJNqHiQPNrFsRaIg1B0UWw6Tga4pt2LTdrQjVvQqjYKCnGqSbDF gUpeKxuYF7vrAb1Q5wG95xaPEs3IoT0my3YL71Z6z8zzwTyOL0wYd4/YbbpobEqLKA79 Y4ifooCh+Wsx+gqo8o4ezJ0ru9Sdh0T0quBSaJBhx2p/6fCIjrI61sN0ZS2Qof0zosKl JUk46ZStbHirxYAbAcf1ptwsmv7ibSDwKj9QH6Cfcn8I+i3/labkeZbmWoeouDbNbX5F cmzA== X-Gm-Message-State: AOAM532c4h3wnUKVW0j6nqJ3q7bB4LpK3Hx281EuQkzoqoTafoOEZL/9 AFuyGbAgBk1uYtwY3ICeSBY= X-Google-Smtp-Source: ABdhPJw8j8kSHJ4xSxiB6bT1YL4sk7XN/GCNYzKFBjTUx2mSteKc+Y1JZb6r2nLm7KIFw3Bd8FoWyA== X-Received: by 2002:a17:90a:de03:: with SMTP id m3mr606664pjv.20.1610057727336; Thu, 07 Jan 2021 14:15:27 -0800 (PST) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id nm6sm5958542pjb.25.2021.01.07.14.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 14:15:26 -0800 (PST) From: Al Cooper To: linux-kernel@vger.kernel.org Subject: [PATCH] mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend Date: Thu, 7 Jan 2021 17:15:09 -0500 Message-Id: <20210107221509.6597-1-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210107_171531_268237_744AFED8 X-CRM114-Status: GOOD ( 14.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , Florian Fainelli , Al Cooper , linux-mmc@vger.kernel.org, Adrian Hunter , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback") that added a shutdown callback to the diver, is causing "mmc timeout" errors on S5 suspend. The problem was that the "remove" was queuing additional MMC commands after the "shutdown" and these caused timeouts as the MMC queues were cleaned up for "remove". The shutdown callback will be changed to calling sdhci-pltfm_suspend which should get better power savings because the clocks will be shutdown. Fixes: e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback") Signed-off-by: Al Cooper Acked-by: Florian Fainelli Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-brcmstb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index bbf3496f4495..f9780c65ebe9 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -314,11 +314,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) static void sdhci_brcmstb_shutdown(struct platform_device *pdev) { - int ret; - - ret = sdhci_pltfm_unregister(pdev); - if (ret) - dev_err(&pdev->dev, "failed to shutdown\n"); + sdhci_pltfm_suspend(&pdev->dev); } MODULE_DEVICE_TABLE(of, sdhci_brcm_of_match);