On Thursday, October 11, 2018, 5:01:24 PM CEST Alexander Stein wrote: > If the last mailbox is not unlocked explicitly there is a small window > where an already received but not yet stored frame is overwritten in > the SMB (Serial Message Buffer) by the next CAN frame. > Although it is said to be optional, explicitly unlock the mailbox. > > Signed-off-by: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxxxxxxxx> > --- > drivers/net/can/flexcan.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c > index 8e972ef08637..c9d30480aae9 100644 > --- a/drivers/net/can/flexcan.c > +++ b/drivers/net/can/flexcan.c > @@ -720,8 +720,9 @@ static unsigned int flexcan_mailbox_read(struct can_rx_offload *offload, > priv->write(BIT(n - 32), ®s->iflag2); > } else { > priv->write(FLEXCAN_IFLAG_RX_FIFO_AVAILABLE, ®s->iflag1); > - priv->read(®s->timer); > } > + /* Unlock mailbox */ > + priv->read(®s->timer); > > return 1; > } > Gentle ping!