lkml.org 
[lkml]   [2018]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@socionext.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-02-07 20:38    [W:0.140 / U:1.428 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site