* [PATCH] Revert "mmc: mxs: fix card detection in case of 'broken-cd' flag set"
@ 2018-10-24 14:10 Michael Thalmeier
2018-10-24 14:21 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Michael Thalmeier @ 2018-10-24 14:10 UTC (permalink / raw)
To: Roman Peniaev, Sascha Hauer, Ulf Hansson; +Cc: linux-kernel, linux-mmc, michael
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Revert "mmc: mxs: fix card detection in case of 'broken-cd' flag set"
2018-10-24 14:10 [PATCH] Revert "mmc: mxs: fix card detection in case of 'broken-cd' flag set" Michael Thalmeier
@ 2018-10-24 14:21 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2018-10-24 14:21 UTC (permalink / raw)
To: Michael Thalmeier
Cc: Roman Peniaev, Sascha Hauer, Linux Kernel Mailing List,
linux-mmc, michael
On 24 October 2018 at 16:10, Michael Thalmeier
<michael.thalmeier@hale.at> wrote:
> 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.
I would rather make a new fix on top, rather than reverting a four
year old patch. Can you please look into that instead?
Kind regards
Uffe
>
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-24 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24 14:10 [PATCH] Revert "mmc: mxs: fix card detection in case of 'broken-cd' flag set" Michael Thalmeier
2018-10-24 14:21 ` Ulf Hansson
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).