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:   Mon, 30 Nov 2020 15:13:02 -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>
Subject: Re: [BUG] SPI broken for SPI based panel drivers

Hi Nikolaus, thank you for reaching out !

On Mon, Nov 30, 2020 at 2:06 PM H. Nikolaus Schaller <hns@...delico.com> wrote:
>
> But reverting your patch brings back the display. So it appears as if it does not
> fix a breakage, rather breaks a previously working setup.

The patch in question fixes an important breakage: before the patch, literally
hundreds of SPI drivers no longer worked - only if the SPI bus master
driver was using gpio descriptors.

We knew that there was a chance that our fix would break something else.
But hopefully "it fixes more than it breaks"

>
> What should we do?
>

Can you try the following patch ?

diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index 7ceb0ba27b75..c173d7de73b3 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -208,8 +208,8 @@ static void spi_gpio_chipselect(struct spi_device
*spi, int is_active)
        if (spi_gpio->cs_gpios) {
                struct gpio_desc *cs = spi_gpio->cs_gpios[spi->chip_select];

-               /* SPI chip selects are normally active-low */
-               gpiod_set_value_cansleep(cs, (spi->mode & SPI_CS_HIGH)
? is_active : !is_active);
+               /* SPI chip select polarity handled by gpiolib*/
+               gpiod_set_value_cansleep(cs, is_active);
        }
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ