From patchwork Tue Mar 10 15:33:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 184357 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp848457ile; Tue, 10 Mar 2020 08:33:55 -0700 (PDT) X-Received: by 2002:a2e:5744:: with SMTP id r4mr9830682ljd.67.1583854434545; Tue, 10 Mar 2020 08:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583854434; cv=none; d=google.com; s=arc-20160816; b=a7p1UxVTrV319LcvEnnXjShOl1dgmUpnkWzeDnqK4AvylmaK/wPfcXwiNhn4jyAYWz MTh4f60Yocz2Oso/64cbp6u9nuwbAuR8r4BFCYJchp4oP/Lt0WHM5I2FRdMubTcde1dw UY8jC52+ajSIm6442IYg6zxPzep8OnlUXT+9V2x6ppZl5KEjTuzTTDf0hdkHQ31OkUGJ Vjv1akUUBhOTi1CE7UzWqQu3QsE3DD6sljgWPhwlJWcz9VibeqQktYT7R6roswWetvu+ HHhoTkI0jfvT5XRjIKtqS+3fAwf+dMZVbPxSnw/XvNUdxEuoJIFO2I6K1JzFRMwa5c9w TqDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zXfY+hm6nAyuD/AmdMy4F6zgsNBRxXYSqgTSrNob95Q=; b=nutXKC39s1vPbyPnHfhVJwPLoSK/Jn3OAFjH7M46EpXndzpOZwRhfBFnsh1P0N+LOA w1e8NFVS8QAnuWNjY/d7CnJH2qRB6a+R+1XO+aDJCT7TCsCnUZgldGTlD3qSO1Nvcp38 hFwF5KJpfktGDyoz3UbCjlhSyc/iAft/d6xbPXGNVKOeTAxBzs/CRDa5sPrM+lYqZgur fw9BeR0BqYXaPH6+qF1YJxXaC5z+xCx4mZE3IsrxPTNDc/KfNBVku2zWJAhvctg8ZpjX ZwPS5xgSL1enmUm4rH09smk1mmwO/pT3moqR5TDWru2XZFS7ZH2P+pCJXp6ax86sUpF/ psvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=evewDF+w; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h5sor3434349ljl.26.2020.03.10.08.33.54 for (Google Transport Security); Tue, 10 Mar 2020 08:33:54 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=evewDF+w; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zXfY+hm6nAyuD/AmdMy4F6zgsNBRxXYSqgTSrNob95Q=; b=evewDF+wTbM0lLqZStPAgQrySHKOjDHSrTd0D3LYXi3Hs1GFNSR2WKOt5NSBLo8RIp LxOIXvlUl3s7CuyOoTRhBAfyHxGwEtKkv0VIU1R7vqrvkTlLg9qrbqES+G6AwX0c89Gz A0dmrhmJ/vNNCaOjDh2a1J++41kzdyq0wzhbk/qe+/NGoCdog6ZJ9BhLi5F2vygH/2r8 muK7CKqK/LHc8xNMcwbBlDDoC69aDJYHbJ9JJ0e5MO/szgUP5RsFkn/IrdTv2ZueelUS 9vukUF7mTkIb2upmvxx/cqXFl6PlKA5UnMs25tKaAvlBRbydEx3XD0EfYAayl45jYRkO Qx5g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=zXfY+hm6nAyuD/AmdMy4F6zgsNBRxXYSqgTSrNob95Q=; b=cKPGNp4qiRGyJ5eyljmUpzLP4oUXnlpbFZTCdxsULB+pWKwwjTSb5gz/qlrXXTSFnz fvScEsOfJI4tDNnUA0K57EjxkPIo0bYDfiz6rLNaa2BczzfZ6ISIHXLZxR2ipL0Cm1pb w4GWXKc/encyPgz9jcXRf8OUNOreOgNpwt0V6SnWM86lMLR0QAwuxu7GqFgbyM4eoYFE BjIht7qpHFt5QNE5AUYgJacdgfpat9bB/KdA2wUuFSlH7s3JNGS+zBaebHkBtXxnPKkT rpUb2VxQMYIhMGpBh81o+c2uIVS8poLOSMvzAZDEmHr7H8I+azzbSPVFBJWcjXpCEoOe rrjg== X-Gm-Message-State: ANhLgQ3pkx7p+r251fBgSksSKP/MNna/PfQdMaj6JOYlcVTsxgEmQKPp bKXdVpqjKk9SigaGujfRWO5NfVcN X-Google-Smtp-Source: ADFU+vu0tIjfpP50RQbzS8Z+nzh45tErRu3mPFdaEIEBUL9uWfO0Z5/yv52Cb1ks+dOCE2AuCLaiKA== X-Received: by 2002:a2e:3608:: with SMTP id d8mr12867272lja.52.1583854434100; Tue, 10 Mar 2020 08:33:54 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id c22sm17283776lfi.41.2020.03.10.08.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 08:33:53 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Adrian Hunter , Wolfram Sang , Ludovic Barre , Baolin Wang , Linus Walleij , Chaotian Jing , Shawn Lin , mirq-linux@rere.qmqm.pl, Bitan Biswas , Peter Geis , Sowjanya Komatineni , Faiz Abbas , Anders Roxell , Naresh Kamboju , Jon Hunter , stable@vger.kernel.org Subject: [PATCH 4/4] mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY Date: Tue, 10 Mar 2020 16:33:40 +0100 Message-Id: <20200310153340.5593-5-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200310153340.5593-1-ulf.hansson@linaro.org> References: <20200310153340.5593-1-ulf.hansson@linaro.org> MIME-Version: 1.0 It has turned out that the sdhci-tegra 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: Bitan Biswas Reported-by: Peter Geis Suggested-by: Sowjanya Komatineni Cc: Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-tegra.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 403ac44a7378..a25c3a4d3f6c 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1552,6 +1552,9 @@ static int sdhci_tegra_probe(struct platform_device *pdev) if (tegra_host->soc_data->nvquirks & NVQUIRK_ENABLE_DDR50) host->mmc->caps |= MMC_CAP_1_8V_DDR; + /* R1B responses is required to properly manage HW busy detection. */ + host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY; + tegra_sdhci_parse_dt(host); tegra_host->power_gpio = devm_gpiod_get_optional(&pdev->dev, "power",