SPI CAN device enumeration / network device naming

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

 



Hi all,

I'm currently building a open hardware Raspberry Pi HAT 
with four MCP2517FD SPI CAN controllers:
https://github.com/Bytewerk/QuadCAN-FD/tree/v1

This seems to work with the device tree overlay from said 
repository and Martin Sperls latest MCP25xxFD patches \o/

Now, I have one problem and I'm not sure how to address this.
I'm using a Raspberry Pi 3 Model B+ with current raspbian.

Maybe 90% of all boots, I get the following in dmesg:
---
[    3.877118] mcp25xxfd: loading out-of-tree module taints kernel.
[    3.890743] mcp25xxfd spi0.0 can0: MCP2517 successfully initialized.
[    3.901189] mcp25xxfd spi0.1 can1: MCP2517 successfully initialized.
[    3.910035] mcp25xxfd spi1.1 can2: MCP2517 successfully initialized.
[    3.920515] mcp25xxfd spi1.0 can3: MCP2517 successfully initialized.
---

But sometimes, the SPIs seem to get enumerated in different order:
---
[    3.720432] mcp25xxfd: loading out-of-tree module taints kernel.
[    3.733176] mcp25xxfd spi1.1 can0: MCP2517 successfully initialized.
[    3.741914] mcp25xxfd spi1.0 can1: MCP2517 successfully initialized.
[    3.750370] mcp25xxfd spi0.0 can2: MCP2517 successfully initialized.
[    3.758741] mcp25xxfd spi0.1 can3: MCP2517 successfully initialized.
---

Also, I sometimes see the kernel taint message twice or even more.
I expect this to be a concurrency problem with one CPI core enumerating 
one SPI bus, and another core enumerating the other?

What's the best(tm) way to ensure consistent device naming in such a setup?
Is there anything that could be done in device tree 
(so that I wouldn't have to touch the linux image itself)?

Thanks,

Hubert



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux