USB: serial: fix assumption that throttle/unthrottle cannot sleep
many serial subdrivers are clearly written as if throttle/unthrottle cannot sleep. This leads to unneeded atomic submissions. This patch converts affected drivers in a way to makes very clear that throttle/unthrottle can sleep. Thus future misdesigns can be avoided and efficiency and reliability improved. This removes any such assumption using GFP_KERNEL and spin_lock_irq() Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b2a5cf1bdc
commit
6383251545
@@ -290,7 +290,7 @@ static void keyspan_pda_rx_unthrottle(struct tty_struct *tty)
|
||||
/* just restart the receive interrupt URB */
|
||||
dbg("keyspan_pda_rx_unthrottle port %d", port->number);
|
||||
port->interrupt_in_urb->dev = port->serial->dev;
|
||||
if (usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC))
|
||||
if (usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL))
|
||||
dbg(" usb_submit_urb(read urb) failed");
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user