Re: driver migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello


Kind of Driver: Driver for a dongle usb-> serial 
Manufacturer: Io-Data
Device: USB-RSA (based on EZUSB-CHip)
Reference: My last post from 2016-04-02 19:49:40 GMT
Description:
The blocking behaviour that I reported in my last post seems to be induced
by the set_bit and submit_urb in usbrsa_write. If I comment them, the "echo"
or "stty" commands no longer block. If I only comment submit_urb, I
experience blocking.
For the complete source code, please refer to my posting from 2016-04-02
19:49:40 GMT

==== usbrsa_write
.....

dev_dbg(&port->dev, "%s - port %d;URB allocated=%d", __func__,
port->port_number, urb_index);
/* reserve urb */
/* if I comment set_bit and submit_urb, I do not observe 
*  blocking any longer 
*/ 
set_bit(urb_index, &priv->write_urb_pool_lock);

urb = priv->write_urb_pool[urb_index];

spin_unlock_irqrestore(&priv->lock, flags);

/* copy data from userspace into urb transfer buffer */
bytes = (nof_bytes_to_be_sent > port->bulk_out_size) ?
	port->bulk_out_size : nof_bytes_to_be_sent;
...


dev_dbg(&port->dev, "%s - port %d;bytes in urb=%d", __func__,
port->port_number, bytes);
	usb_serial_debug_data(&port->dev,
	__func__, bytes, urb->transfer_buffer);
urb->dev = serial->dev;
urb->transfer_buffer_length = bytes;

/* sent urb to USB-RSA */
//retval = usb_submit_urb(urb, GFP_ATOMIC);
......


Thanks
Tilman




--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux