[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAQ-7U-5=Z26tuiZAcBYwRZaggY0POzYwsFUBZHPkC4z6Q@mail.gmail.com>
Date: Thu, 18 Jan 2018 01:32:28 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: linux-mmc <linux-mmc@...r.kernel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Simon Horman <simon.horman@...ronome.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Ulf Hansson <ulf.hansson@...aro.org>
Subject: Re: [PATCH v2 16/22] mmc: tmio: fix never-detected card insertion bug
2018-01-14 5:59 GMT+09:00 Wolfram Sang <wsa@...-dreams.de>:
>
>> I am talking about the card detection
>> by the IP-builtin circuit.
>
> Yes, I know. As I wrote in one of the previous patches when reviewing
> it, I disabled GPIO CD and used the internal mechanism (for tests where
> it is relevant). Like here, too.
>
>> - GPIO is not set up -> mmc_gpio_get_cd() returns -ENOSYS
>
> Thanks! That pointed me to the right direction. I missed that patch
> 10/22 was still under discussion and not applied to mmc/next, so I had
> to pick it manually.
>
> I can confirm now that there is an issue and your patch fixes it for the
> non-GPIO case. For the GPIO case, however, the TMIO_STAT_CARD_REMOVE |
> TMIO_STAT_CARD_INSERT interrupts are enabled now, too. It didn't harm
> when doing my tests, but we shouldn't do it, to be safe IMO.
>
Could you explain why?
_host->native_hotplug = !(mmc_can_gpio_cd(mmc) ||
mmc->caps & MMC_CAP_NEEDS_POLL ||
!mmc_card_is_removable(mmc));
For the GPIO case, mmc_can_gpio_cd(mmc) is 1,
so _host_>native_hogplug is 0.
Then, my code does nothing, doesn't it?
+ if (_host->native_hotplug)
+ tmio_mmc_enable_mmc_irqs(_host,
+ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT);
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists