All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Balsa" <andrebalsa@gmail.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: linux-amlogic@lists.infradead.org
Subject: Re: Possible regression in driver meson-gx-mmc in kernel 5.0.0
Date: Tue, 5 Mar 2019 15:40:38 +0100	[thread overview]
Message-ID: <CAJDSL=W=EMb3YZikBd5K6nzp+3kLm4O5OXaxgiBtQLMUPfk=CA@mail.gmail.com> (raw)
In-Reply-To: <CAJDSL=X09A5KCT5BLSpMwBRUW_7rb2skJiS99qzTWr+cYcLhtA@mail.gmail.com>

Hello, Jerome, list,

After more testing, I managed to trace the exact patch that was
causing the SD card write errors that I saw with kernel 5.0.0 and was
not seeing with kernel 4.20.13 and earlier:
it is very exactly [RFT PATCH 3/4] mmc: meson-gx: align default phase
on soc vendor tree
 from https://lkml.org/lkml/2018/12/6/746

The patch actually just changes a single value in a single line of code:

- clk_set_phase(host->tx_clk, 270);
+ clk_set_phase(host->tx_clk, 0);

The patch specifically states that the value of zero does not match
the recommended value in the (vendor) documentation, but sets the same
value as in the vendor tree. So it seems there is a mismatch between
the vendor tree and the vendor documentation (I am guessing that is
not an uncommon situation).

If you could kindly point me to the documentation and the vendor tree
repository, I would be able to perhaps bring some more clarifying
information for this issue?

On Mon, Mar 4, 2019 at 5:55 PM André Balsa <andrebalsa@gmail.com> wrote:
>
> Hi Jerome,
> Thanks for the answer.
>
> > You reverted more than one patch here."
>
> Yes, I didn't know which patch exactly was causing the problem.
> If you want me to test the driver with the spinlock removal patch(es)
> applied but without the delay / phase setting patch(es), just say.
>
> Regards,
> Andrew
>
> On Mon, Mar 4, 2019 at 4:34 PM Jerome Brunet <jbrunet@baylibre.com> wrote:
> >
> > On Mon, 2019-03-04 at 14:46 +0100, André Balsa wrote:
> > > Hello, my first post to the list, nice to meet everybody.
> > >
> > > I cannot boot kernel 5.0.0 on my S905 TV box (using
> > > meson-gxbb-p201.dtb) from an SD card, see the errors below (captured
> > > from serial output).
> >
> > As I already pointed out to somebody else, it is difficult to give any form of
> > support for boards we know nothing about, especially the one that are
> > 'conveniently' using the DT of the ref design
> >
> > >
> > > If I revert only meson-gx-mmc.c to the version in kernel 4.20.13,
> > > kernel 5.0.0 boots without any problems.
> >
> > You reverted more than one patch here.
> >
> > >
> > > It seems the problems occur because of patches introduced by Jerome
> > > Brunet in December, see
> > > https://lkml.org/lkml/2018/12/6/745
> > >
> > > My guess is the removal of the spinlock allows for race conditions
> > > that cause the mmc driver to fail when writing to an SD card.
> >
> > 1) As pointed out in the related commit message this spinlock was useless.
> > Anyone looking at the code should be able to see that. What you are seeing is
> > the result of CRC errors.
> >
> > 2) The last 2 patches of related series had been sent as RFT, but noboby
> > replied.
> >
> > These 2 changes helped several designs work and I could not see any regression
> > on the designs I had at the time, including the p200
> >
> > Now we got several reports of regression.
> >
> > It is very difficult to find settings that will work for the all the designs.
> > The documentation is not verbose regarding this. You can't even take the
> > vendor kernel as reference, the code is extremely 'fancy' and phase settings
> > are perpetually cycling within the irq handler, which is unacceptable.
> >
> > We are actively working to solve this and hopefully we will be able to share
> > something soon
> >
> > >
> > > I am available to test the driver further with any proposed solution.
> > >
> > > Regards,
> > > Andrew
> >
> >

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      reply	other threads:[~2019-03-05 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJDSL=VG2YbAwuL_1SOVfWfD4gWquNG353p8LkCP+jiFpiN=9A@mail.gmail.com>
2019-03-04 13:46 ` Possible regression in driver meson-gx-mmc in kernel 5.0.0 André Balsa
2019-03-04 15:34   ` Jerome Brunet
2019-03-04 16:55     ` André Balsa
2019-03-05 14:40       ` André Balsa [this message]

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='CAJDSL=W=EMb3YZikBd5K6nzp+3kLm4O5OXaxgiBtQLMUPfk=CA@mail.gmail.com' \
    --to=andrebalsa@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=linux-amlogic@lists.infradead.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.