On Fri, 17 Sep 2004 [EMAIL PROTECTED] wrote:

>   If is very offtopic please excuse, I have this problem with libusb and a
> FX2 firmware that just spits out a number of packets when triggered by a
> command send to another endpoint :

That's not right.  A device _can't_ just spit out a large number of
packets.  It can't send any packets at all until the host asks for them, 
and then only one at a time.

> I try to grab as many packets as I can in one bulk_read call but the call
> returns with only one packed data, no matter how big is the request I
> send, the program work for something like 3 times when it writes in system
> log something like:
> 
> Sep 17 12:59:57 pcds-83150013032 kernel: ehci_hcd 0000:00:0a.2: qh
> df2ae880 (#18) state 1

I don't know what that error message means.

> after 3 runs it does not work at all, the user program returns with error
> code:
> Read Ret is -110
> 
> and in the system log it says:
> 
> Sep 17 13:00:34 pcds-83150013032 kernel: usb 4-4: bulk timeout on ep2in
> Sep 17 13:00:34 pcds-83150013032 kernel: usb 4-4: usbfs: USBDEVFS_BULK
> failed ep 0x82 len 4096 ret -110

-110 is -ETIMEDOUT, which means that the timeout period you specified when
submitting the request expired before the computer finished receiving all
the data from the device.

>  Some questions, I do not request 4096, the packet size is 448 and I
> request something like 600 of them, where comes the len 4096 in error
> message, is usbfs limited to some maximal transfer size or to just one
> packet per transfe, as far as I see the libusb is just a thin wrapper
> over the kernel functions, maybe I someone cand spread some light over
> this issue including if firmware may be broken or needs to behave
> differently ?

It would be easier to answer if you limit yourself to one question per
sentence.  In order...

What do you mean when you say you requested 600 packets of size 448?  Do
you mean you submitted a single request with a transfer size of 600 * 448
= 268800?  Or did you submit 600 requests each of size 448?

I'm not sure where the 4096 comes from.  Maybe libusb has divided your
big request up into lots of smaller requests, each no larger than 4096.  

Yes, usbfs is limited to a maximum transfer size of 16384 bytes for bulk
transfers.  There is no particular limit on the number of packets,
however.

>From the information you have given, it sounds like the firmware is not
working right.  But I can't be sure because you didn't provide enough
details about what you are doing.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to