linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Thalmeier <michael.thalmeier@hale.at>
To: Roman Peniaev <r.peniaev@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	michael@thalmeier.at
Subject: [PATCH] Revert "mmc: mxs: fix card detection in case of 'broken-cd' flag set"
Date: Wed, 24 Oct 2018 16:10:08 +0200	[thread overview]
Message-ID: <20181024141008.30312-1-michael.thalmeier@hale.at> (raw)

This reverts commit 6f726f495f2d ("mmc: mxs: fix card detection in case of 'broken-cd' flag set").

Since mxs_mmc_probe always sets MMC_CAP_NEEDS_POLL unconditionally, card
detect is not working properly any more since commit 6f726f495f2d.
Instead of querying the card detect status mxs_mmc_get_cd now always
returns 1 which causes probing commands being sent to the mmc card.

The expected behaviour of commit 6f726f495f2d should be reachable by setting
broken_cd instead.

Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at>
---
 drivers/mmc/host/mxs-mmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index add1e70..cfdae61 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -86,8 +86,7 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc)
 	if (ret >= 0)
 		return ret;
 
-	present = mmc->caps & MMC_CAP_NEEDS_POLL ||
-		!(readl(ssp->base + HW_SSP_STATUS(ssp)) &
+	present = !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
 			BM_SSP_STATUS_CARD_DETECT);
 
 	if (mmc->caps2 & MMC_CAP2_CD_ACTIVE_HIGH)
-- 
2.9.2


             reply	other threads:[~2018-10-24 14:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 14:10 Michael Thalmeier [this message]
2018-10-24 14:21 ` [PATCH] Revert "mmc: mxs: fix card detection in case of 'broken-cd' flag set" Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181024141008.30312-1-michael.thalmeier@hale.at \
    --to=michael.thalmeier@hale.at \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=michael@thalmeier.at \
    --cc=r.peniaev@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).