RE: PCI/PCIe cards and MSI support

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

 



Hi Marc,

When switching in MSI mode, we've noticed that once CAN0 is closed
(i.e., once its own interrupt is freed), all other CANs on the same card no longer receive interrupts (i.e., the handler is never called again).

This issue doesn't exist when any other CANx then CAN0 is closed.

The reason of this is not clear. What we know is that this issue doesn't
 exist under Windows for any of our (CAN 2.0 as well as CAN FD) cards. On the contrary, the issue is the same for all of our CAN 2.0 / CAN FD cards under Linux.

Up to now, the only workaround we have to run in MSI mode is to
request_irq() when probing the devices (starting from CAN0) *AND*
free_irq() in the opposite order (ending with CAN0)  when removing the module.

Obvioulsy, enabling/disabling hw interrupts is always done when the can interface is put to up/down.

The "only" side effect is that all MSI interupt levels allocated by the
driver are requested, even if their corresponding interfaces are not UP.

---
Stéphane Grosjean
PEAK-System France
132, rue André Bisiaux
F-54320 MAXEVILLE
Tél : +(33) 9.72.54.51.97



De : Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>

Envoyé : lundi 23 mars 2020 09:38

À : Stéphane Grosjean <s.grosjean@xxxxxxxxxxxxxxx>; Kurt Van Dijck <dev.kurt@xxxxxxxxxxxxxxxxxxxxxx>

Cc : linux-can@xxxxxxxxxxxxxxx <linux-can@xxxxxxxxxxxxxxx>

Objet : Re: PCI/PCIe cards and MSI support




On 3/23/20 9:33 AM, Stéphane Grosjean wrote:

>> This seems a bad idea. Loading the module should not allocate resources.

>> A reasonable point IMHO is the probe of a device.

>

> That's what I was thinking, sorry for the approximation and

> misunderstanding. So, you confirm that I can modify the driver to

> request_irq() when probing the CAN channels one after the other

> rather than when these are opened?



Why exactly do you need to do this?



regards,

Marc



--

Pengutronix e.K.                 | Marc Kleine-Budde           |

Embedded Linux                   | https://www.pengutronix.de  |

Vertretung West/Dortmund         | Phone: +49-231-2826-924     |

Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |


--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt - HRB 9183
Geschaeftsfuehrung: Alexander Gach / Uwe Wilhelm
Unsere Datenschutzerklaerung mit wichtigen Hinweisen
zur Behandlung personenbezogener Daten finden Sie unter
www.peak-system.com/Datenschutz.483.0.html




[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