From patchwork Tue Mar 31 08:56:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 228696 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=-9.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 2060EC2D0F3 for ; Tue, 31 Mar 2020 09:02:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0CC020787 for ; Tue, 31 Mar 2020 09:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645378; bh=tofIbnmadnKlW1E9aujzGi22xYXbLQFA4YGG/fxn2lA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gc9etQTcTdb9csCMS8+9BVa5nBPZMZIwayDgQGjGZrQ1FKk7Xcx4b1F5Vzzgu24EF 66HvXrQ3X4v4wgqwVxGAfZW/T/m7TjypSuznptmNDMPJfLbIVilze/7w6xyri/d5jk Wmczvjc6jQY15+de+FDpbWOoG1/+9k7iGU2GCsE8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730475AbgCaJCd (ORCPT ); Tue, 31 Mar 2020 05:02:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:42100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730489AbgCaJCc (ORCPT ); Tue, 31 Mar 2020 05:02:32 -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 6BC88212CC; Tue, 31 Mar 2020 09:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645351; bh=tofIbnmadnKlW1E9aujzGi22xYXbLQFA4YGG/fxn2lA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NQ2PVwv77DYq8TDh9f9tSWoBzr4KRV4Fdjqlm4D0vIx8ccGgtgQtFxWP7h+bWzA2f 8jJl3cTyMoDQi5eWiekSeFOiSGyqL3KzC0dk2bZM8PMITCLIWG96Z5qBI/5DZS0POY Jzd8vwvRrhb0KUSIQcnB8nAaSbNbBzkXRTpbnWuU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Naresh Kamboju , Anders Roxell , Faiz Abbas , Ulf Hansson , Sasha Levin Subject: [PATCH 5.5 004/170] mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY Date: Tue, 31 Mar 2020 10:56:58 +0200 Message-Id: <20200331085424.558492515@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@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: Ulf Hansson [ Upstream commit 055e04830d4544c57f2a5192a26c9e25915c29c0 ] It has turned out that the sdhci-omap controller requires the R1B response, for commands that has this response associated with them. So, converting from an R1B to an R1 response for a CMD6 for example, leads to problems with the HW busy detection support. Fix this by informing the mmc core about the requirement, via setting the host cap, MMC_CAP_NEED_RSP_BUSY. Reported-by: Naresh Kamboju Reported-by: Anders Roxell Reported-by: Faiz Abbas Cc: Tested-by: Anders Roxell Tested-by: Faiz Abbas Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/host/sdhci-omap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 083e7e053c954..d3135249b2e40 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1134,6 +1134,9 @@ static int sdhci_omap_probe(struct platform_device *pdev) host->mmc_host_ops.execute_tuning = sdhci_omap_execute_tuning; host->mmc_host_ops.enable_sdio_irq = sdhci_omap_enable_sdio_irq; + /* R1B responses is required to properly manage HW busy detection. */ + mmc->caps |= MMC_CAP_NEED_RSP_BUSY; + ret = sdhci_setup_host(host); if (ret) goto err_put_sync;