linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: Check conflicting CS based on spi->chip_select instead of device name
Date: Thu, 09 Jan 2014 15:59:38 +0200	[thread overview]
Message-ID: <52CEAB4A.605@linux.intel.com> (raw)
In-Reply-To: <1389273835-8615-1-git-send-email-mika.westerberg@linux.intel.com>

On 01/09/2014 03:23 PM, Mika Westerberg wrote:
> Commit e13ac47bec20 (spi: Use stable dev_name for ACPI enumerated SPI
> slaves) changed the SPI device naming to be based on ACPI device name
> instead of carrying bus number and chip select for devices enumerated
> from ACPI namespace.
>
> In case of a buggy BIOS that lists multiple SPI devices sharing the same
> chip select (even though they should use different) the current code fails
> to detect that and allows the devices to be added to the bus.
>
> Fix this by walking through the bus and comparing spi->chip_select instead
> of device name. This should work regardless what the device name will be in
> future.
>
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
>   drivers/spi/spi.c | 18 +++++++++++++-----
>   1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 349ebba4b199..13dcc360bde6 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
>
I guess this is a valid fix in that sense that before my patch those 
ill-defined SPI devices were not added. Is this something which should 
go to 3.13?

Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

  reply	other threads:[~2014-01-09 13:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 13:23 [PATCH] spi: Check conflicting CS based on spi->chip_select instead of device name Mika Westerberg
2014-01-09 13:59 ` Jarkko Nikula [this message]
2014-01-09 16:05   ` Mika Westerberg
2014-01-09 14:06 ` Mark Brown
2014-01-09 14:27   ` Mika Westerberg
2014-01-09 14:36     ` Mark Brown

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=52CEAB4A.605@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).