All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	phone-devel@vger.kernel.org,
	Stephan Gerhold <stephan@gerhold.net>,
	newbyte@disroot.org
Subject: Re: [PATCH] mmc: core: Add a card quirk for broken boot partitions
Date: Thu, 1 Jul 2021 00:33:11 +0200	[thread overview]
Message-ID: <CACRpkda7m6HnA7y9coYoXd9YFNjSzAfuYiLNURHe1geb8rF++Q@mail.gmail.com> (raw)
In-Reply-To: <CAPDyKForEi09uyXL4nDn27bth+btEYAhzd6+YusMrRBygCdtEA@mail.gmail.com>

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

  reply	other threads:[~2021-06-30 22:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 23:29 [PATCH] mmc: core: Add a card quirk for broken boot partitions Linus Walleij
2021-06-29 13:56 ` Ulf Hansson
2021-06-29 17:23   ` Linus Walleij
2021-06-30 11:49     ` Ulf Hansson
2021-06-30 14:25       ` Linus Walleij
2021-06-30 15:27         ` Ulf Hansson
2021-06-30 22:33           ` Linus Walleij [this message]
2021-07-01 14:26             ` Ulf Hansson
2021-07-01 15:52               ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACRpkda7m6HnA7y9coYoXd9YFNjSzAfuYiLNURHe1geb8rF++Q@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=newbyte@disroot.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=stephan@gerhold.net \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.