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
@@ -391,7 +391,7 @@ static void empeg_unthrottle(struct tty_struct *tty)
|
||||
dbg("%s - port %d", __func__, port->number);
|
||||
|
||||
port->read_urb->dev = port->serial->dev;
|
||||
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
|
||||
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
|
||||
if (result)
|
||||
dev_err(&port->dev,
|
||||
"%s - failed submitting read urb, error %d\n",
|
||||
|
Reference in New Issue
Block a user