mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
USB: serial: keyspan_pda: fix dropped unthrottle interrupts
Commitc528fcb116
("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:c528fcb116
("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>
This commit is contained in:
parent
d1849b9ff9
commit
696c541c8c
1 changed files with 2 additions and 2 deletions
|
@ -172,11 +172,11 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/* status interrupt */
|
/* status interrupt */
|
||||||
if (len < 3) {
|
if (len < 2) {
|
||||||
dev_warn(&port->dev, "short interrupt message received\n");
|
dev_warn(&port->dev, "short interrupt message received\n");
|
||||||
break;
|
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]) {
|
switch (data[1]) {
|
||||||
case 1: /* modemline change */
|
case 1: /* modemline change */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue