On Fri, Mar 18, 2005 at 11:24:37AM +0530, [EMAIL PROTECTED] wrote:
>  Hello,
>   
>  I am writing a driver for USB to Serial converter /bridge 
>  having 4 serial ports .
>   
>  I was going through the existing USB to Serial driver . I 
>  have a  few questions related to those . I would be glad to 
>  receive responses to my queries .
>   
>  1. "num_interrupt_in" field in the usb_serial_device_type 
>  structure is for the device and not for the port .

Yes.

>  I mean if there is a device which has INTERRUPT IN and BULK 
>  OUT endpoints per port and has 4 such ports I would decalare 
>  usb_serial_device_type  with the fields poplulated as follows 
>      .num_interrupt_in =     4,
>          .num_bulk_in =          0,
>          .num_bulk_out =         4,
>          .num_ports =            4,

Yes.

>  2. what are the tx Credits for the edgeport adapter ?  I 
>  really didnt get a feel of what it means .

That's a device specific thing.  It has to do with how the device
handles how much room the device has left in its buffer.  If your device
doesn't have such a thing, don't worry about it.

>  3. Do I need to maintain a buffer at the driver level . What 
>  governs the desicion of having a buffer at the driver level.
>     In many sample drivers I found a separate buffer - e.g 
>  pl2303.c , kobil_sct.c .

It all depends on your device, and how fast you want the data to go
through it, and fixing some fun tty corner cases where the usb-serial
driver dropps data, but the tty layer doesn't think it was allowed to do
that.  See the archives for more details on this if you are curious.

>    I guess it should be a good since we can only transmit 64 
>  bytes ( maxPacketSize of endpoint ) in an URB  and the 
>  applications talking to serial device may send more bytes than these .

Not necessarily, you can always return a short write, that's legal.
It's when the above mentioned condition happens that you can not ignore
it.

>  4.   What should be the criteria used to select the size of 
>  the buffer . 

Whatever you think will work best.

>  5. What is the significance of this step in "kobil_write()" 
>  and "kobil_read_int_callback"
>   
>  // someone sets the dev to 0 if the close method has been called
>                  port->interrupt_in_urb->dev = port->serial->dev;

Don't really know.

Hope this helps,

greg k-h


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to