You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Marc Kleine-Budde
parent
37b75a3aa8
commit
bc03a54139
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user