On Sat, 20 Mar 2004, Brad Campbell wrote: > Just a thought, but does anyone know if USB does endian swapping of words or > something similar? I > have an idea I need to look at further.
USB is almost entirely little-endian, like the x86 processor. There is no endian swapping of bytes or words inside data sectors being read or written from a mass storage device. That's true even on big-endian processors; the sector contents are treated simply as an unstructured list of bytes. I'd have to check to be certain, but ISTR that even the ordering of bits within a byte (as they travel the bus) is little-endian: The LSB is transmitted first. On the other hand, the 6-, 10-, or 12-byte command blocks written to mass storage devices derive from the SCSI standard, which is big-endian. So things like sector addresses and numbers of sectors (or transfer lengths generally) are byte-swapped on Intel processors. > > The difference may be the sequence of bits going across the wire. Certain > > bit patterns may cause problems for the packet-reassembly circuitry in the > > Genesys interface. > > Thats what I figure. I hope it does not mean we have to inspect each packet before > it goes out, I > can see the cpu usage skyrocketing. At least it's in a defined place in the packet > however. I wish I > had my digital storage cro still as it happens at 12mbps also and would not be that > difficult to > actually capture. It's not clear whether this problem is a feature of all Genesys interfaces or just yours. > > Do you have a Windows system you can use to write a file containing the > > bad byte sequence? > > Yes, my laptop has a winxp partition I installed specially for this task and my > desktop had a > win2000 partition I use for a similar purpose. > > It you do, does it work? > Apparently so. > > If it does, how can we find > > out what's different? > > I'm not sure, I thought perhaps I could install some usb protocol sniffer and see > what gives. I > don't have a phone line at home at the moment so I find it difficult to interact out > of work hours > and it means if I forgot to download something it has to wait until the next day. > Damn Etisalat! When you get a chance, you can try using USB Snoopy under Windows 2000. My suggestion for how to do this while minimizing the size of the capture log: Set up beforehand a single, rather small (8 MB or so) VFAT partition on your drive and no other partitions. Then just copy the test file to the drive under Windows. > Maybe Windows deliberately breaks up the > > transmission when it sees the forbidden sequence crossing a sector > > boundary. > > That was my suspicion but I know less about windows and it's usb stack than I know > about the linux > stack and what I know about the linux stack I could write on a post it note. I am > learning however. I too know almost nothing about Windows's USB stack. Going by Murphy's law, though, my guess is that your log will show the entire transfer taking place normally, not broken up, with no indication of any difficulty at all. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel