Skip to content

Commit 8d2aed6

Browse files
pankajbansalnxpgregkh
authored andcommitted
can: flexcan: Unlock the MB unconditionally
commit 5178b7c upstream. Unlock the MB irrespective of reception method being FIFO or timestamp based. It is optional but recommended to unlock Mailbox as soon as possible and make it available for reception. Reported-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 09132a6 commit 8d2aed6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/net/can/flexcan.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,14 @@ static unsigned int flexcan_mailbox_read(struct can_rx_offload *offload,
720720
priv->write(BIT(n - 32), &regs->iflag2);
721721
} else {
722722
priv->write(FLEXCAN_IFLAG_RX_FIFO_AVAILABLE, &regs->iflag1);
723-
priv->read(&regs->timer);
724723
}
725724

725+
/* Read the Free Running Timer. It is optional but recommended
726+
* to unlock Mailbox as soon as possible and make it available
727+
* for reception.
728+
*/
729+
priv->read(&regs->timer);
730+
726731
return 1;
727732
}
728733

0 commit comments

Comments
 (0)