aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPankaj Bansal <[email protected]>2018-08-01 19:36:46 +0530
committerMarc Kleine-Budde <[email protected]>2018-11-09 17:20:12 +0100
commit5178b7cd8e42448b1041716f124734eaaa36ca50 (patch)
tree62c9b23882d44086203db4e1f38fea778caf0042
parentf164d0204b1156a7e0d8d1622c1a8d25752befec (diff)
can: flexcan: Unlock the MB unconditionally
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 <[email protected]> Signed-off-by: Pankaj Bansal <[email protected]> Cc: linux-stable <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
-rw-r--r--drivers/net/can/flexcan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 8e972ef08637..0431f8d05518 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -720,9 +720,14 @@ static unsigned int flexcan_mailbox_read(struct can_rx_offload *offload,
priv->write(BIT(n - 32), &regs->iflag2);
} else {
priv->write(FLEXCAN_IFLAG_RX_FIFO_AVAILABLE, &regs->iflag1);
- priv->read(&regs->timer);
}
+ /* Read the Free Running Timer. It is optional but recommended
+ * to unlock Mailbox as soon as possible and make it available
+ * for reception.
+ */
+ priv->read(&regs->timer);
+
return 1;
}