Skip to content

Commit

Permalink
can: flexcan: Disable error interrupt when bus error reporting is dis…
Browse files Browse the repository at this point in the history
…abled

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>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Alexander Stein authored and Marc Kleine-Budde committed Aug 21, 2014
1 parent 37b75a3 commit bc03a54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/can/flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,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;
Expand Down

0 comments on commit bc03a54

Please sign in to comment.