Re: [PATCH 1/2] mmc: mmci: Drop re-read of MMCISTATUS for busy status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 17 Jul 2019 at 14:51, Ludovic BARRE <ludovic.barre@xxxxxx> wrote:
>
> hi Ulf, JN
>
> IMHO you can't split my initial patch in two,
> this piece of code is needed (function: mmci_irq)
>
> -               status &= readl(host->base + MMCIMASK0);
> +               status &= readl(host->base + MMCIMASK0) |
> +                       host->variant->busy_detect_flag;

I am not buying that (at least yet), because it means that you tag on
the busy bit even if the card hasn't signaled busy, which to me seems
wrong.

I running some tests now, hopefully I will be able to complete them
before end today, else I will continue tomorrow mornings.

Kind regards
Uffe

>
> Regards,
> Ludo
>
> On 7/17/19 2:36 PM, Ulf Hansson wrote:
> > On Wed, 17 Jul 2019 at 12:16, Jean Nicolas GRAUX
> > <jean-nicolas.graux@xxxxxx> wrote:
> >>
> >> Hello Ulf, all,
> >>
> >> For testing purpose, I cherry-picked your patch on top of a 4.19.30 basis.
> >> (I apologize as it's a bit old. I miss time to do a rebase on current
> >> linux-next right now.)
> >
> > No worries about the old kernel, for this change, I think it should be
> > suufient good as base.
> >
> >>
> >> Unfortunately, I got a kernel crash applying it :(
> >
> > Huh.
> >
> > Is it crashing because it fails to mount the rootfs on the SD/MMC card?
> >
> >>
> >> As you may know, ST sta1295/sta1385 SoC embeds the same pl08x variant
> >> than one in U8500.
> >> So It looks like double-checking again mmci status to make sure busy
> >> flag is still set
> >> just before proceeding for busy end is required in our case.
> >
> > Yeah, actually I have a u8500 on my desk now, so I will also test the
> > patch to see what goes on. Didn't have the time to do it earlier.
> >
> > My guess is that, at the point when we received the IRQ for a command
> > that has been sent, and then reading the MMCISTATUS register in
> > mmci_irq(), the card has not yet started to signal busy on DAT1 and
> > hence the busy status bit isn't set yet. This leads to that we will
> > never enable the busy end mask, but just completing the request
> > directly.
> >
> > Anyway, let me check and see if I can confirm it.
> >
> >>
> >> Regards.
> >> Jean-Nicolas.
> >
> > Thanks a lot for helping out testing and reporting the problem!
> >
> > [...]
> >
> > Kind regards
> > Uffe
> >



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux