Skip to content

Commit bc03a54

Browse files
Alexander Steinmarckleinebudde
authored andcommitted
can: flexcan: Disable error interrupt when bus error reporting is disabled
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 <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 37b75a3 commit bc03a54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/can/flexcan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,8 @@ static int flexcan_chip_start(struct net_device *dev)
852852
if (priv->devtype_data->features & FLEXCAN_HAS_BROKEN_ERR_STATE ||
853853
priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
854854
reg_ctrl |= FLEXCAN_CTRL_ERR_MSK;
855+
else
856+
reg_ctrl &= ~FLEXCAN_CTRL_ERR_MSK;
855857

856858
/* save for later use */
857859
priv->reg_ctrl_default = reg_ctrl;

0 commit comments

Comments
 (0)