Skip to contentSkip to conversation

USB storage timeout and oops

linux-usb-devel Alan Stern 1 participant 1 message Jun 4, 2003 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Alan Stern

author
#1 lore raw

This is good. And quite interesting. It illustrates a problem with the current SCSI code as well as a problem with the USB drivers.

By the way, Andras, was the device plugged directly into your computer's USB port or did you use an intermediate hub?

Quoted 1 line · Major A
Quoted 1 line
Jun  3 23:06:27 ventus kernel: usb-storage: Status code 0; transferred 131072/131072

That's the last successful read. Following this we have a sequence of failed DATA-IN and control transfers, with one successful DATA-OUT. Why that should have worked when the others failed is beyond me.

<snip>

Quoted 7 lines
Quoted 7 lines
Jun  3 23:07:17 ventus kernel: usb-storage: Command TEST_UNIT_READY (6 bytes)
Jun  3 23:07:17 ventus kernel: usb-storage:  00 00 00 00 00 00
Jun  3 23:07:17 ventus kernel: usb-storage: Bulk command S 0x43425355 T 0x129 Trg 0 LUN 0 L 0 F 0 CL 6
Jun  3 23:07:17 ventus kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
Jun  3 23:07:17 ventus kernel: usb-storage: Status code 0; transferred 31/31
Jun  3 23:07:17 ventus kernel: usb-storage: -- transfer complete
Jun  3 23:07:17 ventus kernel: usb-storage: Bulk command transfer result=0

That's the successful DATA-OUT.

<snip>

Quoted 3 lines
Quoted 3 lines
Jun  3 23:08:07 ventus kernel: usb-storage: usb_storage_bus_reset called
Jun  3 23:08:07 ventus kernel: hub 5-2:0: port 2 not reset yet, waiting 10ms
Jun  3 23:08:07 ventus kernel: usb-storage: usb_reset_device returns -19

ENODEV from a port reset? Sounds like a problem with the root hub driver or the controller itself. Or else the device crashed _really_ hard.

Quoted 3 lines
Quoted 3 lines
Jun  3 23:08:07 ventus kernel: scsi: Device offlined - not ready after error recovery: host 2 channel 0 id 0 lun 0
Jun  3 23:08:07 ventus kernel: SCSI disk error : <2 0 0 0> return code = 0x6050000
Jun  3 23:08:07 ventus kernel: end_request: I/O error, dev sda, sector 47975616

Here the SCSI layer gave up on the device and set it offline. All the I/O requests from this point will fail.

Quoted 4 lines
Quoted 4 lines
Jun  3 23:08:07 ventus kernel: usb-storage: queuecommand() called
Jun  3 23:08:07 ventus kernel: Buffer I/O error on device sda1, logical block 5996948
Jun  3 23:08:07 ventus kernel: usb-storage: *** thread awakened.
Jun  3 23:08:07 ventus kernel: usb-storage: Command WRITE_10 (10 bytes)

But oddly enough, even though the device is off-line the SCSI driver has queued another WRITE command. That shouldn't have happened, and of course it fails.

Quoted 11 lines

Anything after this is just reiserfs complaining. What I did, BTW, is to boot the computer, mount the external drive, during which reiserfs checks the transaction log (which in this case was non-empty, so it definitely wrote data to the disk), then after a few directory listings I do an "md5sum *.png > md5sums" in one of the directories on the disk, and this pretty instantly causes the abovementioned timeout/oops/whatever.

Hope this helps a bit. If you need more info, please let me know what I have to do in order to get it as I'm not really familiar with the debug options.

Alan Stern