public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	kbuild test robot <lkp@intel.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Masahisa Kojima <masahisa.kojima@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH] spi/acpi: fix incorrect ACPI parent check
Date: Wed, 19 Jun 2019 17:42:55 +0300	[thread overview]
Message-ID: <20190619144255.GG2640@lahna.fi.intel.com> (raw)
In-Reply-To: <08e498d6-1ff8-771f-7d4f-6ea5f705d386@linux.intel.com>

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.

  reply	other threads:[~2019-06-19 14:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  9:52 [PATCH] spi/acpi: fix incorrect ACPI parent check Ard Biesheuvel
2019-06-19 10:16 ` Mika Westerberg
2019-06-19 11:58   ` Jarkko Nikula
2019-06-19 11:59     ` Ard Biesheuvel
2019-06-19 13:21       ` Jarkko Nikula
2019-06-19 13:58         ` Ard Biesheuvel
2019-06-19 14:17           ` Jarkko Nikula
2019-06-19 14:42             ` Mika Westerberg [this message]
2019-06-20 10:33               ` Ard Biesheuvel
2019-06-20 10:41                 ` Mika Westerberg
2019-06-20 11:19                   ` Mark Brown
2019-06-20 11:51                     ` Ard Biesheuvel
2019-06-20 12:21                 ` Jarkko Nikula
2019-06-20 12:25                   ` Ard Biesheuvel

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=20190619144255.GG2640@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=broonie@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lukas@wunner.de \
    --cc=masahisa.kojima@linaro.org \
    --cc=rjw@rjwysocki.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox