Commit ad230234 authored by ZHU Yi (ST-FIR/ENG1-Zhu)'s avatar ZHU Yi (ST-FIR/ENG1-Zhu) Committed by Marc Kleine-Budde

can: flexcan: fix state transition regression

Update state upon any interrupt to report correct state transitions in
case the flexcan core enabled the broken error state quirk fix.
Signed-off-by: default avatarZhu Yi <yi.zhu5@cn.bosch.com>
Signed-off-by: default avatarMark Jonas <mark.jonas@de.bosch.com>
Acked-by: default avatarWolfgang Grandegger <wg@grandegger.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v4.11
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 28e33f9d
......@@ -765,8 +765,9 @@ static irqreturn_t flexcan_irq(int irq, void *dev_id)
flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT, &regs->esr);
}
/* state change interrupt */
if (reg_esr & FLEXCAN_ESR_ERR_STATE)
/* state change interrupt or broken error state quirk fix is enabled */
if ((reg_esr & FLEXCAN_ESR_ERR_STATE) ||
(priv->devtype_data->quirks & FLEXCAN_QUIRK_BROKEN_ERR_STATE))
flexcan_irq_state(dev, reg_esr);
/* bus error IRQ - handle if bus error reporting is activated */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment