aboutsummaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2013-10-04 10:52:36 +0200
committerBen Hutchings <ben@decadent.org.uk>2013-10-26 21:06:14 +0100
commit9203ceb63af1d8a2c1557ff01cbb2d75e960d2ef (patch)
tree0070b935d060a87d524447658afe3d0bbc7b794a /samples
parentc23e05d637c461d13e473bee595ae781622b5ebf (diff)
can: flexcan: flexcan_chip_start: fix regression, mark one MB for TX and abort pending TX
commit d5a7b406c529e4595ce03dc8f6dcf7fa36f106fa upstream. 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: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> [bwh: Backported to 3.2: - Adjust context - Hardware local echo is still enabled] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions