stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "can: esd_usb2: Fix can_dlc value for received RTR, frames" has been added to the 3.18-stable tree
@ 2017-10-23 12:56 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-23 12:56 UTC (permalink / raw)
  To: Stefan.Maetje, gregkh, mkl, stefan.maetje; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    can: esd_usb2: Fix can_dlc value for received RTR, frames

to the 3.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     can-esd_usb2-fix-can_dlc-value-for-received-rtr-frames.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 72d92e865d1560723e1957ee3f393688c49ca5bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20M=C3=A4tje?= <Stefan.Maetje@esd.eu>
Date: Wed, 18 Oct 2017 13:25:17 +0200
Subject: can: esd_usb2: Fix can_dlc value for received RTR, frames
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Stefan Mätje <Stefan.Maetje@esd.eu>

commit 72d92e865d1560723e1957ee3f393688c49ca5bf upstream.

The dlc member of the struct rx_msg contains also the ESD_RTR flag to
mark received RTR frames. Without the fix the can_dlc value for received
RTR frames would always be set to 8 by get_can_dlc() instead of the
received value.

Fixes: 96d8e90382dc ("can: Add driver for esd CAN-USB/2 device")
Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/usb/esd_usb2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -334,7 +334,7 @@ static void esd_usb2_rx_can_msg(struct e
 		}
 
 		cf->can_id = id & ESD_IDMASK;
-		cf->can_dlc = get_can_dlc(msg->msg.rx.dlc);
+		cf->can_dlc = get_can_dlc(msg->msg.rx.dlc & ~ESD_RTR);
 
 		if (id & ESD_EXTID)
 			cf->can_id |= CAN_EFF_FLAG;


Patches currently in stable-queue which might be from Stefan.Maetje@esd.eu are

queue-3.18/can-esd_usb2-fix-can_dlc-value-for-received-rtr-frames.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-23 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-23 12:56 Patch "can: esd_usb2: Fix can_dlc value for received RTR, frames" has been added to the 3.18-stable tree gregkh

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).