projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28e33f9
)
can: flexcan: fix state transition regression
author
ZHU Yi (ST-FIR/ENG1-Zhu)
<
[email protected]
>
Fri, 15 Sep 2017 06:59:15 +0000
(06:59 +0000)
committer
Marc Kleine-Budde
<
[email protected]
>
Thu, 19 Oct 2017 11:05:53 +0000
(13:05 +0200)
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 <
[email protected]
>
Signed-off-by: Mark Jonas <
[email protected]
>
Acked-by: Wolfgang Grandegger <
[email protected]
>
Cc: linux-stable <
[email protected]
> # >= v4.11
Signed-off-by: Marc Kleine-Budde <
[email protected]
>
drivers/net/can/flexcan.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/flexcan.c
b/drivers/net/can/flexcan.c
index 13f0f219d8aa83ab0ce52823f6ddb697d58c316b..df4bfb83024c24d501457dacd8107ac6e97a5ebe 100644
(file)
--- a/
drivers/net/can/flexcan.c
+++ b/
drivers/net/can/flexcan.c
@@
-765,8
+765,9
@@
static irqreturn_t flexcan_irq(int irq, void *dev_id)
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 */