Re: [PATCH] spi/acpi: fix incorrect ACPI parent check

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

 



On Wed, Jun 19, 2019 at 05:17:59PM +0300, Jarkko Nikula wrote:
> Hi
> 
> On 6/19/19 4:58 PM, Ard Biesheuvel wrote:
> > So can you explain how exactly the I2C GPIO expander is failing? I
> > struggle to understand how the SPI slave probing could be related to
> > that.
> > 
> They don't show up in /sys/kernel/debug/gpio, are not present in
> /sys/bus/i2c/devices/ but SPI core instead tries add them with a bogus Chip
> Select number:
> 
> [    5.727699][    T1] pxa2xx-spi pxa2xx-spi.5: cs56 >= max 4
> [    5.733545][    T1] spi_master spi5: failed to add SPI device INT3491:00
> from ACPI

Just a guess but looking at the 4c3c59544f33 acpi_register_spi_device()
does not seem to zero fill the whole struct acpi_spi_lookup structure so
when it is supposed to bail out when SPI slave was not found:

	if (!lookup.max_speed_hz)
 		return AE_OK

it instead continues to register SPI slave because lookup.max_speed_hz
may contain whatever garbage there is in the stack at that address.



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux