[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mmc
Subject:    Re: [PATCH] mmc: core: Add a card quirk for broken boot partitions
From:       Linus Walleij <linus.walleij () linaro ! org>
Date:       2021-06-30 22:33:11
Message-ID: CACRpkda7m6HnA7y9coYoXd9YFNjSzAfuYiLNURHe1geb8rF++Q () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jun 30, 2021 at 5:28 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:

> >         /* Handle busy detection on DAT0 if the variant supports it. */
> >         if (busy_resp && host->variant->busy_detect)
> >                 if (!host->ops->busy_complete(host, status, err_msk))
> >                         return;
> >
> > These seemed to be especially problematic to me.
>
> Yes, exactly. The IRQ based busy detection code gets disabled with my
> debug patch.
>
> It looks like there are some race conditions in the HW busy detection
> path for mmci, which gets triggered by this eMMC card.
(...)
> Although, it's more optimal to receive an IRQ when busy on DAT0 is
> de-asserted, rather than polling with ->card_busy(). Hence we also
> have MMC_CAP_WAIT_WHILE_BUSY.

Hmmmmm it kind of assumes that DAT0 will be de-asserted *before*
we get a command response, never after. I think that is what the card
is doing. If that is out-of-spec then we need to have a quirk like
this but if it is legal behaviour, we rather need to fix the mmci driver.

Yours,
Linus Walleij
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic