diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2014-08-12 04:47:21 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-08-21 04:49:59 -0400 |
commit | bc03a54139baafcd8fe89ad115411c2c9c8a4905 (patch) | |
tree | d31283e9f29a68e5975e611a16addc88b70d4cd3 | |
parent | 37b75a3aa8ec7031df75219fe2f8e5e9b7be398f (diff) |
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 <alexander.stein@systec-electronic.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/net/can/flexcan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index f425ec2c7839..a691651f9ad9 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
@@ -852,6 +852,8 @@ static int flexcan_chip_start(struct net_device *dev) | |||
852 | if (priv->devtype_data->features & FLEXCAN_HAS_BROKEN_ERR_STATE || | 852 | if (priv->devtype_data->features & FLEXCAN_HAS_BROKEN_ERR_STATE || |
853 | priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) | 853 | priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING) |
854 | reg_ctrl |= FLEXCAN_CTRL_ERR_MSK; | 854 | reg_ctrl |= FLEXCAN_CTRL_ERR_MSK; |
855 | else | ||
856 | reg_ctrl &= ~FLEXCAN_CTRL_ERR_MSK; | ||
855 | 857 | ||
856 | /* save for later use */ | 858 | /* save for later use */ |
857 | priv->reg_ctrl_default = reg_ctrl; | 859 | priv->reg_ctrl_default = reg_ctrl; |