2005/9/15, Alan Stern <[EMAIL PROTECTED]>:
> > During device scan, It seems that the driver (mass-storage ?) is
> > periodically issuing a transfer on endpoint 0 of the stick then
> > waiting for something (during 6 or 7 seconds). Here's is the transfer:
> >
> > SETUP (urb = 0xc02806e0) -> SETUP token (003-00): data [ff 00 00 00
> > 00 00 00 10]
> > STATUS -> OUT token (003:00)
> >
> > The same behaviour is happening when mounting the device. Could you
> > tell me what's going on here ?
>
> You're getting a lot of resets.
>
> > I attached the full communication when plugging the stick.
>
> It's a real nuisance to read hex dumps of data packets. Instead, turn on
> CONFIG_USB_STORAGE_DEBUG. The log will be a lot easier to read and
> understand.
>
I now have the log with usb storage debug messages. During device
scanning, the host controller is returning a "data error" status every
time the usb-storage layer issue an IN command. Unfortunately I don't
know exactly what "data error" status means....the datasheet is so
poor :(
After 3 retries, I give back the URB to the mass-storage driver. I
indicate an error by setting urb->status to -EPROTO (I don't if it's
the correct value...). Then the mass-storage driver detect the error
and reset the device, wait for 6 seconds and retries the transfer.
This time the transfer succesfully finishes ! Eventually a new
transfer is issued and the same scenario is occuring. I attached the
log corresponding to one buggy sequence.
Another weird point. When I disable debug log, the device
configuration fails ! Still because of data error. The only difference
is that the hcd is running faster...
Thanks
--
Franck
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x1 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
Vendor: Corsair Model: Flash Voyager Rev: 1.00
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage: 00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x2 L 0 F 0 Trg 0 LUN 0 CL 12
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
------- Start (c028b7a0)
-> OUT token (003:01):
55 53 42 43 02 00 00 00
00 00 00 00 00 00 0c 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
write 0x001f0080 in bd (0xa0010010)
read 0x08 in status reg
read 31 in bd count
------- End (c028b7a0)
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
------- Start (c028b7a0)
-> IN token (003:02):
write 0x000d0080 in bd (0xa0010000)
read 0x00 in status reg
*** handshake: data error (0xf)
------- Start (c028b7a0)
-> IN token (003:02):
write 0x000d0080 in bd (0xa0010000)
read 0x00 in status reg
*** handshake: data error (0xf)
------- Start (c028b7a0)
-> IN token (003:02):
write 0x000d0080 in bd (0xa0010000)
read 0x00 in status reg
*** handshake: data error (0xf)
------- End (c028b7a0)
usb-storage: Status code -71; transferred 0/13
usb-storage: -- unknown error
usb-storage: Bulk status result = 4
usb-storage: -- transport indicates error, resetting
usb-storage: usb_stor_Bulk_reset called
usb-storage: usb_stor_control_msg: rq=ff rqtype=21 value=0000 index=00 len=0
------- Start (c028b7a0)
-> SETUP token (003-00):
21 ff 00 00 00 00 00 00
write 0x00080080 in bd (0xa0010010)
read 0x08 in status reg
-> OUT token (003:00):
write 0x000000c0 in bd (0xa0010000)
read 0x00 in status reg
------- End (c028b7a0)
usb-storage: Soft reset: clearing bulk-in endpoint halt
usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=82 len=0
------- Start (c028b7a0)
-> SETUP token (003-00):
02 01 00 00 82 00 00 00
write 0x00080080 in bd (0xa0010010)
read 0x08 in status reg
-> OUT token (003:00):
write 0x000000c0 in bd (0xa0010000)
read 0x00 in status reg
------- End (c028b7a0)
usb-storage: usb_stor_clear_halt: result = 0
usb-storage: Soft reset: clearing bulk-out endpoint halt
usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=01 len=0
------- Start (c028b7a0)
-> SETUP token (003-00):
02 01 00 00 01 00 00 00
write 0x00080080 in bd (0xa0010010)
read 0x08 in status reg
-> OUT token (003:00):
write 0x000000c0 in bd (0xa0010000)
read 0x00 in status reg
------- End (c028b7a0)
usb-storage: usb_stor_clear_halt: result = 0
usb-storage: Soft reset done
usb-storage: scsi cmd done, result=0x70000
usb-storage: queuecommand called
usb-storage: *** thread sleeping.
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage: 00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x3 L 0 F 0 Trg 0 LUN 0 CL 12
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
------- Start (c028b7a0)
-> OUT token (003:01):
55 53 42 43 03 00 00 00
00 00 00 00 00 00 0c 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
write 0x001f0080 in bd (0xa0010010)
read 0x08 in status reg
read 31 in bd count
------- End (c028b7a0)
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
------- Start (c028b7a0)
-> IN token (003:02):
write 0x000d0080 in bd (0xa0010000)
read 0x00 in status reg
read 13 in bd count
55 53 42 53 03 00 00 00
00 00 00 00 00
------- End (c028b7a0)
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x3 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command READ_CAPACITY (10 bytes)
usb-storage: 25 00 00 00 00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x4 L 8 F 128 Trg 0 LUN 0 CL 12
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes