On Fri, 3 Sep 2004, Toralf Lund wrote:

> I'm having some problems with a custom USB device that communicates with 
> a Linux host running usb-uhci (Red Hat Linux 9, kernel-2.4.20-31.9)
> Simply put, bulk read (via libusb usb_bulk_read()) from the device will 
> sometimes fail. After the system has got into a failure state, all 
> subsequent also return with error. Device reopen doesn't help, either, 
> in fact the device sometimes isn't there any longer (i.e. it won't be 
> returned by a bus scan.) Reloading the kernel module usually puts it 
> right, however.
> 
> I could give you more details, but I think I'll ask first of all if 
> anyone can explain what's going on when the following system log 
> messages occur:
> 
> Sep  3 15:29:58 indonesia kernel: usb-uhci.c: interrupt, status 2, 
> frame# 915

That doesn't mean anything useful.  In fact, that message has been 
eliminated in later kernel versions.

> Sep  3 15:29:58 indonesia kernel: usbdevfs: USBDEVFS_BULK failed dev 2 
> ep 0x82 len 108 ret -84

Most of that is pretty clear.  Device number, endpoint number + direction, 
transfer length.  The return code -84 is -EILSEQ (you can find it in 
include/asm-generic/errno.h), and according to 
Documentation/usb/error-codes.txt, -EILSEQ is a CRC mismatch.  In other 
words, the received packet was invalid -- either it was transmitted wrong 
or it got garbled.

> Sep  3 15:30:01 indonesia kernel: usb_control/bulk_msg: timeout
> Sep  3 15:30:01 indonesia kernel: usbdevfs: USBDEVFS_BULK failed dev 2 
> ep 0x82 len 32 ret -110

Timeout again is pretty clear.  Also -110 is -ETIMEDOUT.  The device 
failed to complete the bulk-in request within the time limit specified by 
your program.

> Sep  3 15:30:04 indonesia kernel: usb_control/bulk_msg: timeout
> Sep  3 15:30:04 indonesia kernel: usbdevfs: USBDEVFS_BULK failed dev 2 
> ep 0x82 len 32 ret -110

Same as before.

> Also, is there anything else I can do to make it easier to track down 
> the problem? It is probably a device error, but can the driver help me 
> identify it?

Maybe it's not a device problem, maybe it's a bad cable connection.  It's 
impossible to say for sure, since all you know is what the computer 
received.  At this point you probably know almost everything that the 
driver knows.  But you could try looking at the source code for the 
driver; there might DEBUG options that have been disabled.  If you enable 
them maybe you'll learn more.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to