FAILED: patch "[PATCH] USB: cdc-acm: fix close_delay and closing_wait units in" failed to apply to 4.14-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.14-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 ------------------
From 633e2b2ded739a34bd0fb1d8b5b871f7e489ea29 Mon Sep 17 00:00:00 2001
From: Anthony Mallet <[email protected]>
Date: Thu, 12 Mar 2020 14:31:00 +0100
Subject: [PATCH] USB: cdc-acm: fix close_delay and closing_wait units in
TIOCSSERIAL
close_delay and closing_wait are specified in hundredth of a second but stored internally in jiffies. Use the jiffies_to_msecs() and msecs_to_jiffies() functions to convert from each other.
drivers/usb/class/cdc-acm.c +5 -4
@@ -896,10 +896,10 @@ static int get_serial_info(struct tty_struct *tty, struct serial_struct *ss) ss->xmit_fifo_size = acm->writesize; ss->baud_base =le32_to_cpu (acm->line.dwDTERate); - ss->close_delay = acm->port.close_delay /10 ; + ss->close_delay =jiffies_to_msecs (acm->port.close_delay) /10 ; ss->closing_wait = acm->port.closing_wait ==ASYNC_CLOSING_WAIT_NONE ?ASYNC_CLOSING_WAIT_NONE : - acm->port.closing_wait /10 ; +jiffies_to_msecs (acm->port.closing_wait) /10 ;return 0 ; }
@@ -909,9 +909,10 @@ static int set_serial_info(struct tty_struct *tty, struct serial_struct *ss)unsigned int closing_wait, close_delay;int retval =0 ; - close_delay = ss->close_delay *10 ; + close_delay =msecs_to_jiffies (ss->close_delay *10 ); closing_wait = ss->closing_wait ==ASYNC_CLOSING_WAIT_NONE ? -ASYNC_CLOSING_WAIT_NONE : ss->closing_wait *10 ; +ASYNC_CLOSING_WAIT_NONE : +msecs_to_jiffies (ss->closing_wait *10 );mutex_lock (&acm->port.mutex);
Sasha Levin
maintainerQuoted 18 lines · On Mon, Mar 23, 2020 at 01:29:35PM +0100, [email protected] wrote:
The patch below does not apply to the 4.14-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 ------------------
From
633e2b2ded739a34bd0fb1d8b5b871f7e489ea29Mon Sep 17 00:00:00 2001
From: Anthony Mallet <[email protected]>
Date: Thu, 12 Mar 2020 14:31:00 +0100
Subject: [PATCH] USB: cdc-acm: fixclose_delayandclosing_waitunits in TIOCSSERIAL
Quoted 8 lines
close_delayandclosing_waitare specified in hundredth of a second but stored internally in jiffies. Use thejiffies_to_msecs()andmsecs_to_jiffies()functions to convert from each other.Signed-off-by Anthony Mallet <[email protected]>Cc stable <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Both this and b401f8c4f492 ("USB: cdc-acm: fix rounding error in TIOCSSERIAL") depended on b401f8c4f492 ("USB: cdc-acm: fix rounding error in TIOCSSERIAL").
I've fixed it to remove the dependency and queued both patches to 4.19-4.4.
Signature · 2 lines
Thanks, Sasha