diff options
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r-- | drivers/usb/serial/option.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 4f985f43e79e..92d0f925d053 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -273,12 +273,9 @@ static int option_write(struct usb_serial_port *port, | |||
273 | 273 | ||
274 | this_urb = portdata->out_urbs[i]; | 274 | this_urb = portdata->out_urbs[i]; |
275 | if (this_urb->status == -EINPROGRESS) { | 275 | if (this_urb->status == -EINPROGRESS) { |
276 | if (this_urb->transfer_flags & URB_ASYNC_UNLINK) | ||
277 | continue; | ||
278 | if (time_before(jiffies, | 276 | if (time_before(jiffies, |
279 | portdata->tx_start_time[i] + 10 * HZ)) | 277 | portdata->tx_start_time[i] + 10 * HZ)) |
280 | continue; | 278 | continue; |
281 | this_urb->transfer_flags |= URB_ASYNC_UNLINK; | ||
282 | usb_unlink_urb(this_urb); | 279 | usb_unlink_urb(this_urb); |
283 | continue; | 280 | continue; |
284 | } | 281 | } |
@@ -293,7 +290,6 @@ static int option_write(struct usb_serial_port *port, | |||
293 | memcpy (this_urb->transfer_buffer, buf, todo); | 290 | memcpy (this_urb->transfer_buffer, buf, todo); |
294 | this_urb->transfer_buffer_length = todo; | 291 | this_urb->transfer_buffer_length = todo; |
295 | 292 | ||
296 | this_urb->transfer_flags &= ~URB_ASYNC_UNLINK; | ||
297 | this_urb->dev = port->serial->dev; | 293 | this_urb->dev = port->serial->dev; |
298 | err = usb_submit_urb(this_urb, GFP_ATOMIC); | 294 | err = usb_submit_urb(this_urb, GFP_ATOMIC); |
299 | if (err) { | 295 | if (err) { |
@@ -513,10 +509,8 @@ static int option_open(struct usb_serial_port *port, struct file *filp) | |||
513 | 509 | ||
514 | static inline void stop_urb(struct urb *urb) | 510 | static inline void stop_urb(struct urb *urb) |
515 | { | 511 | { |
516 | if (urb && urb->status == -EINPROGRESS) { | 512 | if (urb && urb->status == -EINPROGRESS) |
517 | urb->transfer_flags &= ~URB_ASYNC_UNLINK; | ||
518 | usb_kill_urb(urb); | 513 | usb_kill_urb(urb); |
519 | } | ||
520 | } | 514 | } |
521 | 515 | ||
522 | static void option_close(struct usb_serial_port *port, struct file *filp) | 516 | static void option_close(struct usb_serial_port *port, struct file *filp) |