lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 1 Dec 2020 13:43:36 -0500
From:   Sven Van Asbroeck <thesven73@...il.com>
To:     "H. Nikolaus Schaller" <hns@...delico.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Mark Brown <broonie@...nel.org>,
        kernel list <linux-kernel@...r.kernel.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Discussions about the Letux Kernel 
        <letux-kernel@...nphoenux.org>,
        Andreas Kemnade <andreas@...nade.info>
Subject: Re: [BUG] SPI broken for SPI based panel drivers

Hi Nikolaus,

On Tue, Dec 1, 2020 at 12:13 PM H. Nikolaus Schaller <hns@...delico.com> wrote:
> > Am 01.12.2020 um 17:53 schrieb Sven Van Asbroeck <thesven73@...il.com>:
> > On Tue, Dec 1, 2020 at 11:43 AM H. Nikolaus Schaller <hns@...delico.com> wrote:
> >>
> >> You are right. It is active low.
> >>
> >
> > In that case, we have a very simple solution, just remove the spi-cs-high,
> > and things will work.
>
> We originally had it that way and because there was a change in gpiolib we had
> to introduce it.

The current rules re. spi chip-selects in devicetrees are here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpiolib-of.c?h=v5.10-rc6#n191

This is the way I see things:
- according to the current rules, your devicetree describes a spi panel with
  an active-high chip select
- the actual chip select of your panel is active-low
- a spi/gpiod bug inverted the chip-select in many instances
- because of this bug, your devicetree happened to work before 766c6b63aa04
- 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors")
  fixes this chip-select polarity bug
- you now need to remove your devicetree work-around for this bug by reverting
  f1f028ff89cb0d3

>
> I am not sure if DT maintainers accept that we revert a DT change just to
> handle some change in a driver. Usually they insist on fixing a driver and
> live with the DT. DT is carved in stone or could be ROM...

This is above my paygrade, but I've always assumed that the devicetree ABI
is an in-kernel ABI, i.e. not a userspace ABI. Meaning that it is flexible and
there is no obligation to keep it 100% backwards compatible. Of course Rob
Herring may want to keep it as backwards-compatible as possible, but that's
an altogether different thing from having a userspace-type ABI.

>
> So you could try to submit a revert of f1f028ff89cb0d3 with a description
> why it is needed. And please make sure that it is also applied where your
> patch is backported to stable. So it should have some
>
> Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors")

I have no insight in your devicetrees, and no hardware to test it out either.
As a user of these trees, you are best placed to make the change and test it
out. I invite you to submit a patch (revert of f1f028ff89cb0d3) to the
mailing list.

>
>
> So you mean you are just restoring the behaviour before
>
>         6953c57ab172
>
> was introduced?
>

That was based on my incorrect interpretation of the devicetree spi cs
rules, my apologies. I have linked to the correct rules in the link above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ