[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171024125655.171168789@linuxfoundation.org>
Date: Tue, 24 Oct 2017 15:07:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Zhu Yi <yi.zhu5@...bosch.com>,
Mark Jonas <mark.jonas@...bosch.com>,
Wolfgang Grandegger <wg@...ndegger.com>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH 4.13 29/85] can: flexcan: fix state transition regression
4.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: ZHU Yi (ST-FIR/ENG1-Zhu) <Yi.Zhu5@...bosch.com>
commit ad2302345d59d29232cb668baaae9e840925d153 upstream.
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: Zhu Yi <yi.zhu5@...bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@...bosch.com>
Acked-by: Wolfgang Grandegger <wg@...ndegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/can/flexcan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -765,8 +765,9 @@ static irqreturn_t flexcan_irq(int irq,
flexcan_write(reg_esr & FLEXCAN_ESR_ALL_INT, ®s->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 */
Powered by blists - more mailing lists