* Patch "can: gs_usb: fix return value of the "set_bittiming" callback" has been added to the 4.9-stable tree
@ 2018-01-10 12:20 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-01-10 12:20 UTC (permalink / raw)
To: wg, gregkh, mkl; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
can: gs_usb: fix return value of the "set_bittiming" callback
to the 4.9-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-gs_usb-fix-return-value-of-the-set_bittiming-callback.patch
and it can be found in the queue-4.9 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 d5b42e6607661b198d8b26a0c30969605b1bf5c7 Mon Sep 17 00:00:00 2001
From: Wolfgang Grandegger <wg@grandegger.com>
Date: Wed, 13 Dec 2017 19:52:23 +0100
Subject: can: gs_usb: fix return value of the "set_bittiming" callback
From: Wolfgang Grandegger <wg@grandegger.com>
commit d5b42e6607661b198d8b26a0c30969605b1bf5c7 upstream.
The "set_bittiming" callback treats a positive return value as error!
For that reason "can_changelink()" will quit silently after setting
the bittiming values without processing ctrlmode, restart-ms, etc.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/usb/gs_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/can/usb/gs_usb.c
+++ b/drivers/net/can/usb/gs_usb.c
@@ -449,7 +449,7 @@ static int gs_usb_set_bittiming(struct n
dev_err(netdev->dev.parent, "Couldn't set bittimings (err=%d)",
rc);
- return rc;
+ return (rc > 0) ? 0 : rc;
}
static void gs_usb_xmit_callback(struct urb *urb)
Patches currently in stable-queue which might be from wg@grandegger.com are
queue-4.9/can-gs_usb-fix-return-value-of-the-set_bittiming-callback.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-10 12:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10 12:20 Patch "can: gs_usb: fix return value of the "set_bittiming" callback" has been added to the 4.9-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).