From foo@rowland.harvard.edu Fri Jul 29 13:16:21 2005 Date: Fri, 29 Jul 2005 16:11:07 -0400 (EDT) From: Greg Kroah-Hartman Subject: USB: fix up URB_ASYNC_UNLINK usages from the usb-serial drivers Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/keyspan.c | 8 +------- drivers/usb/serial/option.c | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) --- gregkh-2.6.orig/drivers/usb/serial/keyspan.c 2005-06-17 12:48:29.000000000 -0700 +++ gregkh-2.6/drivers/usb/serial/keyspan.c 2005-08-08 16:51:43.000000000 -0700 @@ -383,11 +383,8 @@ dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip); if (this_urb->status == -EINPROGRESS) { - if (this_urb->transfer_flags & URB_ASYNC_UNLINK) - break; if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ)) break; - this_urb->transfer_flags |= URB_ASYNC_UNLINK; usb_unlink_urb(this_urb); break; } @@ -402,7 +399,6 @@ /* send the data out the bulk port */ this_urb->transfer_buffer_length = todo + dataOffset; - this_urb->transfer_flags &= ~URB_ASYNC_UNLINK; this_urb->dev = port->serial->dev; if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { dbg("usb_submit_urb(write bulk) failed (%d)", err); @@ -1119,10 +1115,8 @@ static inline void stop_urb(struct urb *urb) { - if (urb && urb->status == -EINPROGRESS) { - urb->transfer_flags &= ~URB_ASYNC_UNLINK; + if (urb && urb->status == -EINPROGRESS) usb_kill_urb(urb); - } } static void keyspan_close(struct usb_serial_port *port, struct file *filp) --- gregkh-2.6.orig/drivers/usb/serial/option.c 2005-08-08 16:28:48.000000000 -0700 +++ gregkh-2.6/drivers/usb/serial/option.c 2005-08-08 16:51:22.000000000 -0700 @@ -273,12 +273,9 @@ this_urb = portdata->out_urbs[i]; if (this_urb->status == -EINPROGRESS) { - if (this_urb->transfer_flags & URB_ASYNC_UNLINK) - continue; if (time_before(jiffies, portdata->tx_start_time[i] + 10 * HZ)) continue; - this_urb->transfer_flags |= URB_ASYNC_UNLINK; usb_unlink_urb(this_urb); continue; } @@ -293,7 +290,6 @@ memcpy (this_urb->transfer_buffer, buf, todo); this_urb->transfer_buffer_length = todo; - this_urb->transfer_flags &= ~URB_ASYNC_UNLINK; this_urb->dev = port->serial->dev; err = usb_submit_urb(this_urb, GFP_ATOMIC); if (err) { @@ -513,10 +509,8 @@ static inline void stop_urb(struct urb *urb) { - if (urb && urb->status == -EINPROGRESS) { - urb->transfer_flags &= ~URB_ASYNC_UNLINK; + if (urb && urb->status == -EINPROGRESS) usb_kill_urb(urb); - } } etatic void option_close(struct usb_serial_port *port, struct file *filp)