diff options
author | Johan Hovold <johan@kernel.org> | 2020-10-25 18:45:47 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2020-11-04 11:00:17 +0100 |
commit | 696c541c8c6cfa05d65aa24ae2b9e720fc01766e (patch) | |
tree | 398caa6edd145fa522a316de3b907102f4bc8d14 /drivers/usb | |
parent | d1849b9ff9f442b3720e07b2d6f6c5cf1b97b1a3 (diff) | |
download | linux-696c541c8c6cfa05d65aa24ae2b9e720fc01766e.tar.gz linux-696c541c8c6cfa05d65aa24ae2b9e720fc01766e.tar.bz2 linux-696c541c8c6cfa05d65aa24ae2b9e720fc01766e.zip |
USB: serial: keyspan_pda: fix dropped unthrottle interrupts
Commit c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity
checks") broke write-unthrottle handling by dropping well-formed
unthrottle-interrupt packets which are precisely two bytes long. This
could lead to blocked writers not being woken up when buffer space again
becomes available.
Instead, stop unconditionally printing the third byte which is
(presumably) only valid on modem-line changes.
Fixes: c528fcb116e6 ("USB: serial: keyspan_pda: fix receive sanity checks")
Cc: stable <stable@vger.kernel.org> # 4.11
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/keyspan_pda.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index c1333919716b..2d5ad579475a 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -172,11 +172,11 @@ static void keyspan_pda_rx_interrupt(struct urb *urb) break; case 1: /* status interrupt */ - if (len < 3) { + if (len < 2) { dev_warn(&port->dev, "short interrupt message received\n"); break; } - dev_dbg(&port->dev, "rx int, d1=%d, d2=%d\n", data[1], data[2]); + dev_dbg(&port->dev, "rx int, d1=%d\n", data[1]); switch (data[1]) { case 1: /* modemline change */ break; |