[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180207193835.ildbw2wt2zeha6eo@ninjato>
Date: Wed, 7 Feb 2018 20:38:35 +0100
From: Wolfram Sang <wsa@...-dreams.de>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: linux-mmc@...r.kernel.org,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Ulf Magnusson <ulfalizer@...il.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Simon Horman <horms+renesas@...ge.net.au>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Ulf Hansson <ulf.hansson@...aro.org>
Subject: Re: [PATCH v3 13/16] mmc: tmio: fix never-detected card insertion bug
On Thu, Jan 18, 2018 at 01:28:13AM +0900, Masahiro Yamada wrote:
> The TMIO mmc cannot detect the card insertion in native_hotplug mode
> if the driver is probed without a card inserted.
>
> The reason is obvious; all IRQs are disabled by tmio_mmc_host_probe(),
> as follows:
>
> tmio_mmc_disable_mmc_irqs(_host, TMIO_MASK_ALL);
>
> The card event IRQs are first enabled by tmio_mmc_start_command() as
> follows:
>
> if (!host->native_hotplug)
> irq_mask &= ~(TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);
> tmio_mmc_enable_mmc_irqs(host, irq_mask);
>
> If the driver is probed without a card, tmio_mmc_start_command() is
> never called in the first place. So, the card is never detected.
>
> The card event IRQs must be enabled in probe/resume functions.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists