linux/drivers/net/can
Marc Kleine-Budde d5a7b406c5 can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX
In patch

    0d1862e can: flexcan: fix flexcan_chip_start() on imx6

the loop in flexcan_chip_start() that iterates over all mailboxes after the
soft reset of the CAN core was removed. This loop put all mailboxes (even the
ones marked as reserved 1...7) into EMPTY/INACTIVE mode. On mailboxes 8...63,
this aborts any pending TX messages.

After a cold boot there is random garbage in the mailboxes, which leads to
spontaneous transmit of CAN frames during first activation. Further if the
interface was disabled with a pending message (usually due to an error
condition on the CAN bus), this message is retransmitted after enabling the
interface again.

This patch fixes the regression by:
1) Limiting the maximum number of used mailboxes to 8, 0...7 are used by the RX
FIFO, 8 is used by TX.
2) Marking the TX mailbox as EMPTY/INACTIVE, so that any pending TX of that
mailbox is aborted.

Cc: linux-stable <stable@vger.kernel.org>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2013-10-09 23:01:35 +02:00
..
c_can can: c_can: fix error checking of priv->instance in probe() 2013-08-22 09:40:19 +02:00
cc770 net: can: use platform_{get,set}_drvdata() 2013-06-03 13:13:49 +02:00
mscan can: mscan: improve clock API use 2013-08-29 22:49:35 +02:00
sja1000 net: can: use platform_{get,set}_drvdata() 2013-06-03 13:13:49 +02:00
softing net: can: replace strict_strtoul() with kstrtoul() 2013-06-03 00:39:46 -07:00
usb can: pcan_usb_core: fix memory leak on failure paths in peak_usb_start() 2013-09-20 20:58:21 +02:00
at91_can.c can: at91_can: use platform_set_drvdata() 2013-08-22 09:40:19 +02:00
bfin_can.c net: can: use platform_{get,set}_drvdata() 2013-06-03 13:13:49 +02:00
dev.c can: dev: fix nlmsg size calculation in can_get_size() 2013-10-07 15:55:03 -04:00
flexcan.c can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX 2013-10-09 23:01:35 +02:00
grcan.c net: can: use platform_{get,set}_drvdata() 2013-06-03 13:13:49 +02:00
janz-ican3.c net: can: replace strict_strtoul() with kstrtoul() 2013-06-03 00:39:46 -07:00
Kconfig can: flexcan: remove HAVE_CAN_FLEXCAN Kconfig symbol 2013-06-03 13:13:49 +02:00
led.c net: pass info struct via netdevice notifier 2013-05-28 13:11:01 -07:00
Makefile can: add tx/rx LED trigger support 2013-01-26 16:58:59 +01:00
mcp251x.c can: mcp251x: Allow tuning SPI mode and limit maximal SPI speed 2013-08-21 09:28:29 +02:00
pch_can.c can: pch_can: fix invalid error codes 2013-01-26 17:13:41 +01:00
slcan.c slcan: rewrite of slc_bump and slc_encaps 2013-09-20 15:38:27 -04:00
ti_hecc.c net: can: ti_hecc: remove unnecessary platform_set_drvdata() 2013-05-16 13:27:20 +02:00
vcan.c sections: fix section conflicts in drivers/net 2012-10-06 03:04:42 +09:00