lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 8 Jul 2014 14:41:35 +0200
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Roman Pen <r.peniaev@...il.com>
Cc:	Chris Ball <chris@...ntf.net>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Shawn Guo <shawn.guo@...aro.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: mxs: fix card detection in case of 'broken-cd' flag set

On 10 June 2014 16:57, Roman Pen <r.peniaev@...il.com> wrote:
> In case of reboot my olinuxino imx23 board does not see
> mmc card any more. mmc_rescan is being called by delayed
> work in loop, but mxs_mmc_get_cd always returns 0, so we
> will never pass the card detection check and will not do
> further card inition.
>
> This patch is just an attempt to partially revert the patch
> a91fe279ae of Sascha Hauer, where it is claimed that upper
> layer will handle broken card detection using the polling
> logic and MMC_CAP_NEEDS_POLL capability, but seems it is not
> true, because upper logic still expects 1 from 'get_cd'.
>
> So, here we always return 1 (card present) in case of
> MMC_CAP_NEEDS_POLL capability set.
>
> Signed-off-by: Roman Pen <r.peniaev@...il.com>
> CC: Chris Ball <chris@...ntf.net>
> CC: Sascha Hauer <s.hauer@...gutronix.de>
> CC: Fabio Estevam <fabio.estevam@...escale.com>
> CC: Shawn Guo <shawn.guo@...aro.org>
> CC: Ulf Hansson <ulf.hansson@...aro.org>
> CC: linux-mmc@...r.kernel.org
> CC: linux-kernel@...r.kernel.org

Thanks! Applied for next.

Kind regards
Uffe

> ---
>  drivers/mmc/host/mxs-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 073e871..9187ce1 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -82,7 +82,8 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc)
>         if (ret >= 0)
>                 return ret;
>
> -       present = !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
> +       present = mmc->caps & MMC_CAP_NEEDS_POLL ||
> +               !(readl(ssp->base + HW_SSP_STATUS(ssp)) &
>                         BM_SSP_STATUS_CARD_DETECT);
>
>         if (mmc->caps2 & MMC_CAP2_CD_ACTIVE_HIGH)
> --
> 1.9.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ