* [PATCH] can: flexcan: Disable error interrupt when bus error reporting is disabled
@ 2014-08-12 8:47 Alexander Stein
2014-08-14 10:13 ` Marc Kleine-Budde
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stein @ 2014-08-12 8:47 UTC (permalink / raw)
To: Wolfgang Grandegger, Marc Kleine-Budde; +Cc: Alexander Stein, linux-can
In case we don't have FLEXCAN_HAS_BROKEN_ERR_STATE and the user set
CAN_CTRLMODE_BERR_REPORTING once it can not be unset again until reboot.
So in case neither hardware nor user wants the error interrupt disable
the bit.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
drivers/net/can/flexcan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 33aea7eb9337..fd79dd40840b 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -862,6 +862,8 @@ static int flexcan_chip_start(struct net_device *dev)
if (priv->devtype_data->features & FLEXCAN_HAS_BROKEN_ERR_STATE ||
priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
reg_ctrl |= FLEXCAN_CTRL_ERR_MSK;
+ else
+ reg_ctrl &= ~FLEXCAN_CTRL_ERR_MSK;
/* save for later use */
priv->reg_ctrl_default = reg_ctrl;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-14 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-12 8:47 [PATCH] can: flexcan: Disable error interrupt when bus error reporting is disabled Alexander Stein
2014-08-14 10:13 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).