On Tue, 10 May 2005, Dmitri Kostioukov wrote:
>> You could add debugging to the Linux kernel to see if it's getting the
>
>Can you tell me where to add those? I could simply work around this issue but I
>really want to get it fixed.
By far, the easiest way is the USB trace machine, of course. As far as
the kernel, the layers are:
javax.usb (Java)
|
V
javax.usb JNI (C)
| user-space
_____|_________________________
| kernel-space
V
usbfs interface (core/devio.c)
|
V
usb core subsystem (core/usb.c I think)
|
V
Host Controller generic layer (core/hcd.c)
|
V
Host Controller specific layer (host/* depending on specific HC hardware)
|
| Host System
__(USB wire)____________________
| USB Device
V
USB device firmware
The USB trace machine hook inline with the actual USB wire, so you see
exactly everything your device and the host see. The best place to put
kernel debugging (to get the most info) is in the Host Controller specific
layer. In there, there are max-packet-sized buffers called (I think...)
"td" (Transfer Descriptors, in UHCI) or "ed" (Endpoint Descriptors, in
OHCI and EHCI). Debugging each of these "td"s or "ed"s will clearly tell
you whether or not your device is sending a response. Adding the
debugging code will probably not be easy, as you need to know something
about the protocols of the HCs and the design of the HC drivers. And,
there are a LOT (!) of "td"s or "ed"s that happen in normal operation. I
mean, a lot.
The HC generic layer might be an easier place to put the deubgging, but
I'm not sure if you would miss anything that got "lost" in the HCD
specific layer. I mean, theoretically, nothing should be lost :)
Either the data flows up, or an error happens and that flows up. Losing
data is really bad of course.
If you put debugging higher than that, you might as well put it in the
usbfs layer. In that layer, the file you want is
"drivers/usb/core/devio.c" and the specific methods you want are
"proc_submiturb" (which takes your buffer and sends it to lower levels)
and "async_completed" (which is the callback - in interrupt - that the
lower levels call when the device returned data for your buffer).
I'd start with the usbfs layer, and see if it is getting the response you
are missing. If it's missing the response too, you may want to try the
lower levels, but chances are, the device really isn't sending the
response...
--
Dan Streetman
[EMAIL PROTECTED]
---------------------
186,272 miles per second:
It isn't just a good idea, it's the law!
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
javax-usb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel