if (port->write_urb->status == -EINPROGRESS) { 
spin_lock(&port->lock); if (port->write_urb_busy) { spin_unlock(&port->lock); 
int usb_serial_generic_write(struct usb_serial_port *port, const unsigned char *buf, int count){	struct usb_serial *serial = port->serial;	int result;	unsigned char *data;	dbg("%s - port %d", __FUNCTION__, port->number);	if (count == 0) {		dbg("%s - write request of 0 bytes", __FUNCTION__);		return (0);	}	/* only do something if we have a bulk out endpoint */	if (serial->num_bulk_out) {		if (port->write_urb->status == -EINPROGRESS) {			dbg("%s - already writing", __FUNCTION__);			return (0);		}		count = (count > port->bulk_out_size) ? port->bulk_out_size : count;		memcpy (port->write_urb->transfer_buffer, buf, count);		data = port->write_urb->transfer_buffer;		usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, data);		/* set up our urb */		usb_fill_bulk_urb (port->write_urb, serial->dev,				   usb_sndbulkpipe (serial->dev,						    port->bulk_out_endpointAddress),				   port->write_urb->transfer_buffer, count,				   ((serial->type->write_bulk_callback) ? 				     serial->type->write_bulk_callback :				     usb_serial_generic_write_bulk_callback), port);		/* send the data out the bulk port */		result = usb_submit_urb(port->write_urb, GFP_ATOMIC);		if (result)			dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);		else			result = count;		return result;	}	/* no bulk out, so return 0 bytes written */	return (0);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/507ca9bc0476662f3463888d583864834eab1e11/generic.c/buggy/drivers/usb/serial/generic.c