linux_dsm_epyc7002/drivers/net/can/c_can
Thomas Gleixner 64f08f2f35 can: c_can: Fix buffer ordering
The buffer handling of c_can has been broken forever. That leads to
message reordering:

ksoftirqd/0-3     [000] ..s.    79.123776: c_can_poll: rx_poll: val: 00007fff
ksoftirqd/0-3     [000] ..s.    79.124101: c_can_poll: rx_poll: val: 00008001

What happens is:

CPU				HW
				queue new packet into obj 16 (0-15 are busy)
read obj 1-15
return because pending is 0
				set pending obj 16 -> pending reg 8000
				queue new packet into obj 1
				set pending obj 1 -> pending reg 8001

So the current algorithmus reads the newest message first, which
violates the ordering rules of CAN.

Add proper handling of that situation by analyzing the contents of the
pending register for gaps.

This does NOT fix the message object corruption which can lead to
interrupt storms. Thats addressed in the next patches.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[mkl: adjusted subject]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-04-01 11:54:58 +02:00
..
c_can_pci.c can: c_can: remove unnecessary pci_set_drvdata() 2013-09-21 15:43:15 +02:00
c_can_platform.c can: c_can: Fix hardware raminit function 2014-04-01 11:54:57 +02:00
c_can.c can: c_can: Fix buffer ordering 2014-04-01 11:54:58 +02:00
c_can.h can: c_can: Add d_can raminit support 2012-11-27 09:49:31 +01:00
Kconfig can: Kconfig: convert 'depends on CAN_DEV' into 'if CAN_DEV...endif' block 2013-01-26 16:58:58 +01:00
Makefile c_can_pci: generic module for C_CAN/D_CAN on PCI 2012-06-19 21:22:28 +02:00