From patchwork Tue Mar 10 15:33:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 184353 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp848329ile; Tue, 10 Mar 2020 08:33:46 -0700 (PDT) X-Received: by 2002:a2e:b6d3:: with SMTP id m19mr5057276ljo.68.1583854426409; Tue, 10 Mar 2020 08:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583854426; cv=none; d=google.com; s=arc-20160816; b=ExXe0GL79dRlhTWGg/tczcaBUzc/AJRdW6bC5QkwlmUkaKVIupkVW7u7g2w/50+pkE /Q11i38GCcrpPpxd0xJVMRyoxOzfAjD9RyMftYhWcXYAjiqVtnRDu+KiKWs0aTPgGc3q KLMh3z1QMire7Ynb8VGmVvP5u4bizGDknI/ZasFr3aHxAqirwuEvKoxSLZVwxm5joh0Q Zr6q4/EwytRiQV4qHvaxTxCOHzGNxD2qrq31ZAAd/CVcPxUfiDUuyD/iUkwrmWOic2NF 0b1YfClT0AaMrRH4WqLdmdnexnC86EVZSf+5adcmFatWFaS+DPSDo1S/OSCdsT9qy0mL +T2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=SfzE4jRtNpXlK2zcVo4+x24MTpsQQGPfGgY331EDlm4=; b=PjKP1LrNtbNDGy0Uby5xrL9pGkucEC504ggL2ncrNJVC7UJHHG8zF/JCLxydg7CiK/ zB+p/r+fADgjwz0q9nS2hEjNTSudapWhzQPmeMgEZxIkcRY07q6Uvin9t8ssfnObQsM7 wOZ3TiVy0bgAM1CI57FJ9ZamlyXQ8V6YKxD4fvXKUasP7xS3lf3J6QsTk8hMypTMxtNd eaEBEtjPsfBuTQZMZMLwdIg3WZEa0lgUgmnspplc/+axpBFXt3bARXbRb9ZQGoXJiJRI fQZQnQMWg5DtqDx+0iAYENiEi16BNhPFyLIe+3+4udgiXReBimtA/cWR8ULon6NkozSA ToDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wb8KLpem; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 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-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id h5sor3434085ljl.26.2020.03.10.08.33.46 for (Google Transport Security); Tue, 10 Mar 2020 08:33:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wb8KLpem; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 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:mime-version :content-transfer-encoding; bh=SfzE4jRtNpXlK2zcVo4+x24MTpsQQGPfGgY331EDlm4=; b=Wb8KLpemWL6aZKZIvd5drXop5eVrNoye/DWGMSflGGiYkGqu1qxTjZAXE1DfDSEges ZxDzle+f+T0eNqLspGsmwZksY1CSB6axTaq69BgZYPpUQoiXllQ3nmoI89O9N6YYBQVi CiVIGtXaalg3F/U59zMSP0PamcWXyYllekkFnHqu6GnEgviqQ+TrftzvP/o01W5ZqRdn TrUOiwKPya58MRF5A/OPXmb+8xQeW/+TJqGE+5tN/1SJKB46cncKDP1r90lLEhVpDYaF gugHPYRRFsmErqkaCgsiM5AD1bhBh27DuDDqxK9ZvMqoEy3S2ADDfCTPBXn/TzEmo+2h GZFw== 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:mime-version :content-transfer-encoding; bh=SfzE4jRtNpXlK2zcVo4+x24MTpsQQGPfGgY331EDlm4=; b=UBodqu+9kVGCkv9m9GH4/G8r74mpDisa0lcTobrOvCSN1OeJs1z/wQXEZOykEWaXdV L7XKYwuEJ0XRm8Si6xxjaxMbiA10XzS0dtHGKxOJXfURBDSA4aQJoc734yRcYv+hN9oH EYbo5g0lShk4aYg+JL1nUlj1pCsejG5jwQ2z40zKYwXn6bsjoeC7V/F5G/AqEROReglE ENOzUCYtIhB2Rf1YFPvj9SX0kgdGJUzpAX93fRFr2a6BywvXD1KMFqTVRRSPUHa+yHmF RItoE9WmzbnOOQQFAczisKrXXJptf1MLQ6cudd9v6dx52iAXy9S3fUVig0MaWrCuoqrw Zdgw== X-Gm-Message-State: ANhLgQ18RA0j+j20lVhwsT5ndEPAS4iNikRwmVvOMH5wJxr2yUcibkY3 vdlnAwO1iRDQjs5HDm2YaRDREyA1 X-Google-Smtp-Source: ADFU+vtpyt0K8reug2l0vZQdbhE69a7PbIK3nSqOBLf1ny+S+rEJu4Qxo352IE0xLKVAgWE+VCL5GA== X-Received: by 2002:a2e:960b:: with SMTP id v11mr12948786ljh.115.1583854425673; Tue, 10 Mar 2020 08:33:45 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 08:33:44 -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 Subject: [PATCH 0/4] mmc: Fix busy detection timeouts for some SDHCI variant Date: Tue, 10 Mar 2020 16:33:36 +0100 Message-Id: <20200310153340.5593-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 The mmc core may decide (for CMD6 and erase/trim/discard operations) to convert from using an R1B response into using an R1 response, in cases when the needed busy timeout exceeds the host's maximum supported HW max_busy_timeout. The core does this to prevent the host from doing HW busy detection and instead rely on polling, as to cope with the needed busy timeout. However, it has turned out that some SDHCI variants (tegra, omap), really requires R1B for all commands that have this response associated with them. This became especially obvious when commit 24ed3bd01d6a ("mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC") (and a few other commits on top) got introduced in v5.6-rc1, as several people reported errors (thanks!). More precisely, the mentioned commit triggered the existing problems described above in the SDHCI variant drivers, when an eMMC cache flush command (CMD6) was issued. This series fixes these problems, but the changes are also targeted for stable releases as the problems have existed since a long time back. Please help out in testing this! Kind regards Ulf Hansson Ulf Hansson (4): mmc: core: Allow host controllers to require R1B for CMD6 mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY drivers/mmc/core/core.c | 5 ++++- drivers/mmc/core/mmc_ops.c | 6 ++++-- drivers/mmc/host/sdhci-omap.c | 3 +++ drivers/mmc/host/sdhci-tegra.c | 3 +++ include/linux/mmc/host.h | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) -- 2.20.1