if (this_urb->transfer_flags & URB_ASYNC_UNLINK) break; 
static int keyspan_write(struct usb_serial_port *port, 			 const unsigned char *buf, int count){	struct keyspan_port_private 	*p_priv;	const struct keyspan_device_details	*d_details;	int				flip;	int 				left, todo;	struct urb			*this_urb; 	int 				err, maxDataLen, dataOffset;	p_priv = usb_get_serial_port_data(port);	d_details = p_priv->device_details;	if (d_details->msg_format == msg_usa90) {   		maxDataLen = 64;		dataOffset = 0;	} else {		maxDataLen = 63;		dataOffset = 1;	}		dbg("%s - for port %d (%d chars), flip=%d",	    __FUNCTION__, port->number, count, p_priv->out_flip);	for (left = count; left > 0; left -= todo) {		todo = left;		if (todo > maxDataLen)			todo = maxDataLen;		flip = p_priv->out_flip;			/* Check we have a valid urb/endpoint before we use it... */		if ((this_urb = p_priv->out_urbs[flip]) == NULL) {			/* no bulk out, so return 0 bytes written */			dbg("%s - no output urb :(", __FUNCTION__);			return count;		}		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;		}		/* First byte in buffer is "last flag" (except for usa19hx) - unused so		   for now so set to zero */		((char *)this_urb->transfer_buffer)[0] = 0;		memcpy (this_urb->transfer_buffer + dataOffset, buf, todo);		buf += todo;		/* 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);		}		p_priv->tx_start_time[flip] = jiffies;		/* Flip for next time if usa26 or usa28 interface		   (not used on usa49) */		p_priv->out_flip = (flip + 1) & d_details->outdat_endp_flip;	}	return count - left;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/242cf670c09c05504ce53dfc27f8331a072f169d/keyspan.c/buggy/drivers/usb/serial/keyspan.c