On Fri, 8 Jul 2005, Artur Szymiec wrote:
> Dear Alan,
>
> I didn't thought that It will be difficult for You to read them so I'm
> sending
> them just like they look in USB snoop. I hope this will help.
> Taking Your suggestion into account - I already try it on another PC - laptop
> with MDK 2005 - same result.
> So do we have any other choice ? I'm reading now the USB specs docs
> and I'm trying to understand the logs but this is difficult to start from the
> beginning to understand all of this at once :-(
> So maybe this is not so bad idea to take a logs what is exactly sent from/to
> device on both Lin/Win and compare - maybe the different is in descriptor
> config or in some points Windows makes more retries or ignore some values ?
The descriptors look the same. The actual commands sent differ in detail,
but overall they are the same. Windows didn't have to retry at all
because it never got any errors! By contrast, the Linux logs you sent a
month ago showed Linux getting many errors, of a sort that would be caused
by hardware or firmware.
> Anyway here are the logs decoded by USB snoop in "human" version.
> Hope You can say some words :-)
At least this was easier to read. But I didn't learn much from it, just
that the device works okay under Windows and not under Linux.
I have seen this sort of thing happen before, with devices using chips
made by Genesys. It turned out that the chips required a non-standard
delay of about 100 microseconds at certain times. Windows either included
the delay or just ran slower than Linux, with the same end result as
you're seeing. Maybe your device needs that delay as well. Below is a
patch for 2.6.12 that will add in the delay always. (It comments out a
test that causes the delay to be skipped for non-Genesys devices.)
> Regards
> Artur
>
> PS. If there is any way to learn about USB driver programing for linux
> then reading the spec let me know. I don't want to borrow You all
> the time and just ask - help me ! I want to do something ...
> someday :-)
The only other ways I know of are to read the source code and to read the
chapter on USB programming in Linux Device Drivers, 3rd edition.
Alan Stern
Index: usb-2.6/drivers/usb/storage/transport.c
===================================================================
--- usb-2.6.orig/drivers/usb/storage/transport.c
+++ usb-2.6/drivers/usb/storage/transport.c
@@ -1013,7 +1013,7 @@ int usb_stor_Bulk_transport(struct scsi_
/* Some USB-IDE converter chips need a 100us delay between the
* command phase and the data phase. Some devices need a little
* more than that, probably because of clock rate inaccuracies. */
- if (unlikely(us->flags & US_FL_GO_SLOW))
+ // if (unlikely(us->flags & US_FL_GO_SLOW))
udelay(125);
if (transfer_length) {
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users