* [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
* Re: [PATCH] can: flexcan: Disable error interrupt when bus error reporting is disabled
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
0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2014-08-14 10:13 UTC (permalink / raw)
To: Alexander Stein, Wolfgang Grandegger; +Cc: linux-can
[-- Attachment #1: Type: text/plain, Size: 759 bytes --]
On 08/12/2014 10:47 AM, Alexander Stein wrote:
> 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>
Doh! Right the FLEXCAN_CTRL_ERR_MSK is not affected by the soft-reset of
the core.
Applied to can.
Thanks,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [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).