* Re2: [PATCH] spi:fix IDR collision on systems with both fixed and dynamic SPI bus numbers
@ 2018-08-15 14:28 Kirill Kapranov
2018-08-15 14:36 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Kirill Kapranov @ 2018-08-15 14:28 UTC (permalink / raw)
To: broonie; +Cc: linux-spi, linux-kernel, l.stach
On 08/14/2018 05:18 PM, Mark Brown wrote:
> Is this something that's actually happened for you?
Yes, I observed it.
Background:
The platform: fitlet2 [1] , CPU Intel(R) Celeron(R) CPU J3455 @ 1.50GHz.
On an extension board there are three SPI master controllers "Intel
Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SPI
Controller", controlled with spi_pxa2xx_platform driver,
and two USB/SPI bridges "FT232H Single HS USB-UART/FIFO IC".
I'm working on a driver for FT232H bridge and saw the following:
spi_pxa2xx driver occupy IDs 1,2,3 this way [2].
Thus when my code tries to get ID automatically (set spi_master.bus_num=
-1), it gets IDs 0 and 1, that leads a crash.
BTW, I haven't the faintest idea, how to cure this problem in the
opposite case: when a device that gets ID dynamically squats an ID
purposed for a device that uses a fixed numbering order.
>> + } else {
>> + /* devices with a fixed bus num must check-in with the num */
>> + mutex_lock(&board_lock);
> The indentation here is weird, the comment isn't aligned with the code
> it's commenting on.
I'm sorry for the oversight, it'll be fixed.
[1] https://fit-iot.com/web/products/fitlet2/
[2]
https://elixir.bootlin.com/linux/latest/source/drivers/spi/spi-pxa2xx.c#L1361
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Re2: [PATCH] spi:fix IDR collision on systems with both fixed and dynamic SPI bus numbers
2018-08-15 14:28 Re2: [PATCH] spi:fix IDR collision on systems with both fixed and dynamic SPI bus numbers Kirill Kapranov
@ 2018-08-15 14:36 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2018-08-15 14:36 UTC (permalink / raw)
To: Kirill Kapranov; +Cc: linux-spi, linux-kernel, l.stach
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
On Wed, Aug 15, 2018 at 05:28:56PM +0300, Kirill Kapranov wrote:
> On 08/14/2018 05:18 PM, Mark Brown wrote:
> > Is this something that's actually happened for you?
> Yes, I observed it.
OK, that's useful to know - it differentiates between a nice to have fix
and something that should be sent to Linus and/or stable.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-15 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-15 14:28 Re2: [PATCH] spi:fix IDR collision on systems with both fixed and dynamic SPI bus numbers Kirill Kapranov
2018-08-15 14:36 ` Mark Brown
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).