FAILED: patch "[PATCH] USB: serial: cp210x: fix tiocmget error handling" failed to apply to 4.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.4-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 <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
de24e0a108bc48062e1c7acaa97014bce32a919fMon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Wed, 19 Oct 2016 15:45:07 +0200
Subject: [PATCH] USB: serial: cp210x: fix tiocmget error handling
The current tiocmget implementation would fail to report errors up the stack and instead leaked a few bits from the stack as a mask of modem-status flags.
drivers/usb/serial/cp210x.c +3 -1
@@ -1077,7 +1077,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)u8 control;int result; -cp210x_read_u8_reg (port,CP210X_GET_MDMSTS , &control); + result =cp210x_read_u8_reg (port,CP210X_GET_MDMSTS , &control); +if (result) +return result; result = ((control &CONTROL_DTR ) ?TIOCM_DTR :0 ) |((control &CONTROL_RTS ) ?TIOCM_RTS :0 )
Johan Hovold
maintainerPATCH 1/1 USB: serial: cp210x: fix tiocmget error handling
commit de24e0a108bc48062e1c7acaa97014bce32a919f upstream.
The current tiocmget implementation would fail to report errors up the stack and instead leaked a few bits from the stack as a mask of modem-status flags.
---
Here's a backport of de24e0a108bc ("USB: serial: cp210x: fix tiocmget error handling") to 4.4.
Johan
drivers/usb/serial/cp210x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/serial/cp210x.c +3 -1
@@ -845,7 +845,9 @@ static int cp210x_tiocmget(struct tty_struct *tty)unsigned int control;int result; -cp210x_get_config (port,CP210X_GET_MDMSTS , &control,1 ); + result =cp210x_get_config (port,CP210X_GET_MDMSTS , &control,1 ); +if (result) +return result; result = ((control &CONTROL_DTR ) ?TIOCM_DTR :0 ) |((control &CONTROL_RTS ) ?TIOCM_RTS :0 )
Signature · 1 line
2.7.3
Greg Kroah-Hartman
maintainerRe: [PATCH stable-4.4] USB: serial: cp210x: fix tiocmget error handling
Quoted 6 lines · Johan Hovold
commit
de24e0a108bc48062e1c7acaa97014bce32a919fupstream.The current tiocmget implementation would fail to report errors up the stack and instead leaked a few bits from the stack as a mask of modem-status flags.
Quoted 6 lines
Fixes 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")Signed-off-by Johan Hovold <[email protected]>---
Here's a backport of
de24e0a108bc("USB: serial: cp210x: fix tiocmget error handling") to 4.4.
Thanks, now applied.
greg k-h