can: flexcan: correctly initialize mailboxes
authorDavid Jander <david@protonic.nl>
Wed, 27 Aug 2014 09:58:05 +0000 (11:58 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 5 Nov 2014 20:27:45 +0000 (20:27 +0000)
commitd306d951e2fa1f847f043a9825d2e76d9b192929
treeb67d5731c415ed46a60397531451b2f6ee0fff3d
parent1b184fd1fe3f1e0e4e76d8e85a77dd5a425b289e
can: flexcan: correctly initialize mailboxes

commit fc05b884a31dbf259cc73cc856e634ec3acbebb6 upstream.

Apparently mailboxes may contain random data at startup, causing some of them
being prepared for message reception. This causes overruns being missed or even
confusing the IRQ check for trasmitted messages, increasing the transmit
counter instead of the error counter.

This patch initializes all mailboxes after the FIFO as RX_INACTIVE.

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/can/flexcan.c