* FAILED: patch "[PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit" failed to apply to 4.9-stable tree
@ 2018-07-27 9:16 gregkh
2018-07-27 11:19 ` Roman Fietze
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2018-07-27 9:16 UTC (permalink / raw)
To: roman.fietze, mkl, stable; +Cc: stable
The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 393753b217f05474e714aea36c37501546ed1202 Mon Sep 17 00:00:00 2001
From: Roman Fietze <roman.fietze@telemotive.de>
Date: Wed, 11 Jul 2018 15:36:14 +0200
Subject: [PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit
before checking can.ctrlmode
Inside m_can_chip_config(), when setting up the new value of the CCCR,
the CCCR_NISO bit is not cleared like the others, CCCR_TEST, CCCR_MON,
CCCR_BRSE and CCCR_FDOE, before checking the can.ctrlmode bits for
CAN_CTRLMODE_FD_NON_ISO.
This way once the controller was configured for CAN_CTRLMODE_FD_NON_ISO,
this mode could never be cleared again.
This fix is only relevant for controllers with version 3.1.x or 3.2.x.
Older versions do not support NISO.
Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index b397a33f3d32..8e2b7f873c4d 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -1109,7 +1109,8 @@ static void m_can_chip_config(struct net_device *dev)
} else {
/* Version 3.1.x or 3.2.x */
- cccr &= ~(CCCR_TEST | CCCR_MON | CCCR_BRSE | CCCR_FDOE);
+ cccr &= ~(CCCR_TEST | CCCR_MON | CCCR_BRSE | CCCR_FDOE |
+ CCCR_NISO);
/* Only 3.2.x has NISO Bit implemented */
if (priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit" failed to apply to 4.9-stable tree
2018-07-27 9:16 FAILED: patch "[PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit" failed to apply to 4.9-stable tree gregkh
@ 2018-07-27 11:19 ` Roman Fietze
2018-07-27 11:57 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Roman Fietze @ 2018-07-27 11:19 UTC (permalink / raw)
To: gregkh; +Cc: mkl, stable
Hello,
On Friday, 27 July 2018 11:16:47 CEST gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 4.9-stable tree.
> ...
> From 393753b217f05474e714aea36c37501546ed1202 Mon Sep 17 00:00:00 2001
Telemotive AG
Breitwiesen
73347 Mühlhausen
Tel.: +49 7335 18493-45
Mobil: +49 152 56871006
Email: roman.fietze@telemotive.de
Firmensitz: Telemotive AG,
Breitwiesen, 73347 Mühlhausen
Vorstand: Heinz Huber, Stefan Erhart
Aufsichtsratsvorsitzender: Anton Schantl
Amtsgericht: Ulm, HRB 541321
> From: Roman Fietze <roman.fietze@telemotive.de>
> Date: Wed, 11 Jul 2018 15:36:14 +0200
> Subject: [PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO
> bit before checking can.ctrlmode
>
> Inside m_can_chip_config(), when setting up the new value of the CCCR,
> the CCCR_NISO bit is not cleared like the others, CCCR_TEST, CCCR_MON,
> CCCR_BRSE and CCCR_FDOE, before checking the can.ctrlmode bits for
> CAN_CTRLMODE_FD_NON_ISO.
> ...
This patch cannot be applied to the kernel version 4.9, because the M-CAN
driver in this kernel does not support M-CAN controllers with V3.1.x or
V3.2.x, only 3.0.x is supported.
Support for newer versions than 3.0.x was added in commit
b03cfc5bb0e11f88988e5da2805867e468d03ca1, somewhere between v4.11-rc7 and
v4.12-rc1.
Roman
--
Roman Fietze
Telemotive AG Büro Mühlhausen
Breitwiesen
73347 Mühlhausen
Tel.: +49 7335 18493-45
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit" failed to apply to 4.9-stable tree
2018-07-27 11:19 ` Roman Fietze
@ 2018-07-27 11:57 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2018-07-27 11:57 UTC (permalink / raw)
To: Roman Fietze; +Cc: mkl, stable
On Fri, Jul 27, 2018 at 01:19:26PM +0200, Roman Fietze wrote:
> Hello,
>
> On Friday, 27 July 2018 11:16:47 CEST gregkh@linuxfoundation.org wrote:
>
> > The patch below does not apply to the 4.9-stable tree.
> > ...
> > From 393753b217f05474e714aea36c37501546ed1202 Mon Sep 17 00:00:00 2001
>
> Telemotive AG
> Breitwiesen
> 73347 M�hlhausen
> Tel.: +49 7335 18493-45
> Mobil: +49 152 56871006
> Email: roman.fietze@telemotive.de
>
> Firmensitz: Telemotive AG,
> Breitwiesen, 73347 M�hlhausen
> Vorstand: Heinz Huber, Stefan Erhart
> Aufsichtsratsvorsitzender: Anton Schantl
> Amtsgericht: Ulm, HRB 541321
>
> �
> > From: Roman Fietze <roman.fietze@telemotive.de>
> > Date: Wed, 11 Jul 2018 15:36:14 +0200
> > Subject: [PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO
> > bit before checking can.ctrlmode
> >
> > Inside m_can_chip_config(), when setting up the new value of the CCCR,
> > the CCCR_NISO bit is not cleared like the others, CCCR_TEST, CCCR_MON,
> > CCCR_BRSE and CCCR_FDOE, before checking the can.ctrlmode bits for
> > CAN_CTRLMODE_FD_NON_ISO.
> > ...
>
> This patch cannot be applied to the kernel version 4.9, because the M-CAN
> driver in this kernel does not support M-CAN controllers with V3.1.x or
> V3.2.x, only 3.0.x is supported.
>
> Support for newer versions than 3.0.x was added in commit
> b03cfc5bb0e11f88988e5da2805867e468d03ca1, somewhere between v4.11-rc7 and
> v4.12-rc1.
Great, thanks for letting me know.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-27 13:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 9:16 FAILED: patch "[PATCH] can: m_can.c: fix setup of CCCR register: clear CCCR NISO bit" failed to apply to 4.9-stable tree gregkh
2018-07-27 11:19 ` Roman Fietze
2018-07-27 11:57 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.