On Mon, 18 Jun 2007, Balan, Vineeth (IE10) wrote:

> Hi Alan
> 
> 
> We checked the command and data sent by a RedHat 9 Linux host. (EHCI).
> After enumeration this is the sequence followed by Linux:
> 
> 1. Test Unit Ready  CSW returns 01 - command failed
> 2. Request sense  
>   18 byte sense data is: 
> 
> 70 00 06 00 00 00 00 0A 00 00 00 00 28 00 00 00 00 00 (UNIT ATTENTION)

The 28 means "Not ready to ready transition", as it should.

> 3. Test Unit Ready  CSW returns 00 - command successful
> 4. Read Capacity: data returned is
>               
>       00 0F 1E FF 00 00 02 00   implies LBA size = 512bytes and 400+
> MB size?
> 5. Mode Sense   : 
> Sense data: 03 00 00 00
> 
> 6. Read (10) -- successful - 4096 bytes of data  

Good.  That all looks normal.  Did you get the timings along with the 
packet sequence?

> We then try to follow the same sequence; First Test UNIT ready fails
> (01).
> 2. Request sense yields the same result :
> 
> 70 00 06 00 00 00 00 0A 00 00 00 00 28 00 00 00 00 00 (UNIT ATTENTION).
> 
> 3. Second Test unit ready also fails.(01) So we wait in loop until it
> becomes successful.

That's peculiar.  Compare your timings with the RedHat 9 timings.  
Maybe you are sending your packets too quickly.

It's worth noting that the Linux driver inserts an explicit delay of 
125 us between the CDB and the data transfer for certain devices.  You 
could try adding some delays.

> 4. Request sense. Returns this .
>     70 00 00 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00
> No error?.

I don't get it.  Could it be that your USB stack returns old CSW data?  
Do you increment the value of dCBWTag each time you send a new command?  
Do you compare the tag value in the CBW with the value in the CSW?

> 4. Mode sense returns 4 bytes data.

Are the bytes the same?  What about READ CAPACITY?

> 5. Read (10) fails returns 01 in CSW.
> Note that Read(10) no longer stalls. But simply fails. Please Advice..

Do your best to duplicate exactly the packet contents and timing used 
by the Linux driver.  Note that the READ(10) under Linux was for 8 
sectors (4 KB) rather than just 1 sector.

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-usb-users@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to