android_kernel_motorola_sm6225/drivers/net/can
Eugen Hristev 486954277f can: m_can: implement errata "Needless activation of MRAF irq"
[ Upstream commit 3e82f2f34c930a2a0a9e69fdc2de2f2f1388b442 ]

During frame reception while the MCAN is in Error Passive state and the
Receive Error Counter has thevalue MCAN_ECR.REC = 127, it may happen
that MCAN_IR.MRAF is set although there was no Message RAM access
failure. If MCAN_IR.MRAF is enabled, an interrupt to the Host CPU is
generated.

Work around:
The Message RAM Access Failure interrupt routine needs to check whether

    MCAN_ECR.RP = '1' and MCAN_ECR.REC = '127'.

In this case, reset MCAN_IR.MRAF. No further action is required.
This affects versions older than 3.2.0

Errata explained on Sama5d2 SoC which includes this hardware block:
http://ww1.microchip.com/downloads/en/DeviceDoc/SAMA5D2-Family-Silicon-Errata-and-Data-Sheet-Clarification-DS80000803B.pdf
chapter 6.2

Reproducibility: If 2 devices with m_can are connected back to back,
configuring different bitrate on them will lead to interrupt storm on
the receiving side, with error "Message RAM access failure occurred".
Another way is to have a bad hardware connection. Bad wire connection
can lead to this issue as well.

This patch fixes the issue according to provided workaround.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-14 08:11:07 +02:00
..
c_can can: c_can_pci: make c_can_pci_data const 2017-12-01 09:14:22 +01:00
cc770 can: cc770: fix spelling mistake: "comptibility" -> "compatibility" 2018-07-27 10:40:16 +02:00
ifi_canfd can: ifi: Repair the error handling 2018-03-12 09:55:12 +01:00
m_can can: m_can: implement errata "Needless activation of MRAF irq" 2019-07-14 08:11:07 +02:00
mscan can: mpc5xxx_can: check of_iomap return before use 2018-07-23 14:34:45 +02:00
peak_canfd can: peak_canfd: rearrange the way resources are released 2018-07-27 10:40:18 +02:00
rcar can: rcar_can: Fix erroneous registration 2018-12-13 09:16:10 +01:00
sja1000 can: sja1000: Replace mdelay with usleep_range in pcan_add_channels 2018-07-27 10:40:17 +02:00
softing drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
spi can: mcp251x: add support for mcp25625 2019-07-14 08:11:07 +02:00
usb can: ucan: remove set but not used variable 'udev' 2018-12-13 09:16:10 +01:00
at91_can.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
dev.c can: dev: __can_get_echo_skb(): fix bogous check for non-existing skb by removing it 2019-01-31 08:14:39 +01:00
flexcan.c can: flexcan: fix timeout when set small bitrate 2019-06-25 11:36:00 +08:00
grcan.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
janz-ican3.c can: janz-ican3: fix ican3_xmit()'s return type 2018-07-27 10:40:16 +02:00
Kconfig can: mark led trigger as broken 2018-06-28 21:34:45 +02:00
led.c
Makefile can: remove bfin_can driver 2018-03-26 15:57:02 +02:00
pch_can.c
rx-offload.c can: rx-offload: rename can_rx_offload_irq_queue_err_skb() to can_rx_offload_queue_tail() 2018-12-01 09:37:29 +01:00
slcan.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
sun4i_can.c can: sun4i: fix sun4ican_start_xmit()'s return type 2018-07-27 10:40:16 +02:00
ti_hecc.c can: ti_hecc: Fix napi poll return value for repoll 2017-12-01 11:20:52 +01:00
vcan.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
vxcan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-09 10:37:00 -05:00
xilinx_can.c can: xilinx_can: use correct bittiming_const for CAN FD core 2019-06-25 11:36:00 +08:00