From patchwork Thu Oct 17 13:57:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 176643 Delivered-To: patches@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp965064ill; Thu, 17 Oct 2019 06:57:54 -0700 (PDT) X-Received: by 2002:a2e:7e0f:: with SMTP id z15mr2508244ljc.55.1571320674155; Thu, 17 Oct 2019 06:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571320674; cv=none; d=google.com; s=arc-20160816; b=pprCSsreLsju0jhnfKdyRP5akr0qlPht9umSjyDspYKNw7xy1eUxvvfcb8UnqoGMt3 j3QjPElUvPGu06sUhYFUOO7tB7mxd/shNBhgLY2PXeh9eg8ytFgdhUtCTjhLJ2u66q5z 8GHYYf25STDMj6IQNVRBkFx9wdAcE7WMCVAh21KmpRN2xux+qI8o58HB74XT0wlv7Eee Idp/k1JTEcE02B+l8yjJ8TFvmEb9EI+jIC1R5HDS8PfXnp6881BkuhtGqcO1aTLzrHnB IQKNsznrJyGr1RTwmS/QBIWWFxlhoE2mBxqwz61CB+lgdxVWTJ7RrhenPY6OAJCMOmNO nW+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=MPvIgeYyS5sEH2/sdzpYI6YJY72ljFxd5CJtu+IHloQ=; b=YCYVfLuFHWbHvpRPxveEOuWKeITEBpVdvruBWaEjfp5kYzl63kn0qO2/h/rbWAHX9R J5+FobNcuFx9RtiVAMo+m6B87N9y0wBfRbehLh/j9xA9tHnxb5MECIPP3J5jPSb3Jot7 nBkCzkdwXzb7dsej/ejqYTcuwU5d4cjCaQpLUSvphZZf4KkQcxdF/ghuYAjJ11Ah18Pl IBEcAmE1lDGVCxtFtSI+istBXTY+JAqylYiM040eiTL6Biz9urrgPKaGyzNfPTlcIyH6 Ms/TjDZBBw5sCylW2XMzama5Zds9SMrYjjE2QxvstJnWA8EghLvjXrMsjdmPjz4UFswY DuJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YMFYY9SO; 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 b14sor755959lfa.9.2019.10.17.06.57.53 for (Google Transport Security); Thu, 17 Oct 2019 06:57: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=YMFYY9SO; 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; bh=MPvIgeYyS5sEH2/sdzpYI6YJY72ljFxd5CJtu+IHloQ=; b=YMFYY9SOWuw2gCta52O4XJLM08tWAp/9Z2kzoqZLJ/YQ4cX4Spn3oy410avVSqTrMw YK4NEVG/uPHsWOYvvrIrZsGN8ISXf+SYEgDbnsuqF/OKiXcI9qHA//el6AZ5DQ7LZCPN 6DHX9qWhxCEQ6AoBBEMZ4UpjJythPE92PTmADKDtOXqquPiaK6gZzB04gh85tAQvMkmv 0Eqj7k/oRwQbZA+ViQQPtLonzcIJnULli0n+vAesSX9gPVzipWVx3MaQvnmkesxm9lbP L5KssgY0CPwSdejFzqUvC4yyQro28W3uvW45/UZoVG/cku3ZXxv33Zci8NlZMvT+qBMO h4mQ== 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=MPvIgeYyS5sEH2/sdzpYI6YJY72ljFxd5CJtu+IHloQ=; b=YMo2qjR8OFpu6XwfHeL1YMkSUYWt+jXvtIKhAe2LdH2C8pirnhzf6taZSvN/Fn840h yt4VQozDziHLUReOOMmioCq5wIYmA9VTzrDYhDEP5tLdkilbaOc8tw3COQWjHNnOPVst B6yx8BixyBQDyglRLTkf/YU4HPnGQDxyigKua9lv8Zj45+I67oFQ8pgqVn5d5zJrJ3t7 E8CndH9IYuj83gASHg9fdhQRZZsYTQkAJwiFeqz/9SOcntsVhWl9ISW5McLjxDPogMRc 6C65ji6BGUAjzs/Xv7lrzid3w6T/278blmJXbCsEu4GuTJlbTDE9iT/23tEsifA78dYl 1Shg== X-Gm-Message-State: APjAAAV3CLjDdMn5qW1FVJRjDh/Exrg6c8h0xPRCZrHcPYxYfs5a8xeQ Hoc5H7ekXUI1D7eCLLPQygGd96Xt X-Google-Smtp-Source: APXvYqzgFfNbRiS1dqPAYHp+u5VFayansAF4dMt2TlvUi3kylGKp6MkSIK6/8d+dmnSpQfZGH71o1w== X-Received: by 2002:a19:8c05:: with SMTP id o5mr2459368lfd.53.1571320673697; Thu, 17 Oct 2019 06:57:53 -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 x17sm975088lji.62.2019.10.17.06.57.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 06:57:52 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson , Matthias Kaehlcke Cc: Kalle Valo , Tony Lindgren , Wen Gong , Erik Stromdahl , Eyal Reizer , linux-wireless@vger.kernel.org Subject: [PATCH 0/2] mmc: core: Fixup HW reset for SDIO cards Date: Thu, 17 Oct 2019 15:57:37 +0200 Message-Id: <20191017135739.1315-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 It has turned out that it's not a good idea to try to power cycle and to re-initialize the SDIO card, as currently done through mmc_hw_reset(). This because there may be multiple SDIO funcs attached to the same SDIO card and some of the others that didn't execute the call to mmc_hw_reset(), may then simply experience an undefined behaviour. The following two patches in this series attempts to address this problem, by reworking the mmc_hw_reset() behaviour for SDIO. Note that, the code has only compile tested, so any test on HW is greatly appreciated. Kind regards Uffe Ulf Hansson (2): mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan() mmc: core: Re-work HW reset for SDIO cards drivers/mmc/core/core.c | 10 +++------- drivers/mmc/core/core.h | 2 ++ drivers/mmc/core/sdio.c | 11 +++++++++-- 3 files changed, 14 insertions(+), 9 deletions(-) -- 2.17.1