Raspberry Pi , USB resets and USB to SATA converters
EDIT: 2013-02-03 : There is still an issue, not quite the same though. My continuing notes here.
How to reproduce
Connect a SATA drive (2.5" or 3.5") to your Raspberry Pi (256MB or 512MB and one of many firmware versions) via a USB to SATA converter and put "a lot" of traffic on the USB bus. (In my case it was a remote rsync to the USB drive so I had traffic flow over the Ethernet/USB and USB/SATA converter and indeed a third flow because I was using a pppoatm bridge). So every bit flowed throughthe USB bus 3 times. my flow rate was around 20Mbit/s.
After a period of time (not always the same) all would come crashing down and this would be my syslog entry:
[ 1470.343321] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 1470.423323] usb 1-1.3: device descriptor read/64, error -71
[ 1470.613336] usb 1-1.3: device descriptor read/64, error -71
[ 1470.803363] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 1470.883523] usb 1-1.3: device descriptor read/64, error -71
[ 1471.073276] usb 1-1.3: device descriptor read/64, error -71
[ 1471.263296] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 1471.683173] usb 1-1.3: device not accepting address 4, error -71
[ 1471.763244] usb 1-1.3: reset high-speed USB device number 4 using dwc_otg
[ 1472.183089] usb 1-1.3: device not accepting address 4, error -71
[ 1472.183519] sd 0:0:0:0: Device offlined - not ready after error recovery
[ 1472.183665] sd 0:0:0:0: [sda] Unhandled error code
[ 1472.183684] sd 0:0:0:0: [sda] Result: hostbyte=0x05 driverbyte=0x00
[ 1472.183705] sd 0:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 01 c0 08 48 00 00 08 00
[ 1472.183746] end_request: I/O error, dev sda, sector 29362248
[ 1472.183770] Buffer I/O error on device sda1, logical block 3670025
[ 1472.183785] lost page write due to I/O error on sda1
[ 1472.183849] sd 0:0:0:0: rejecting I/O to offline device
[ 1472.183874] sd 0:0:0:0: [sda] killing request
[ 1472.183910] sd 0:0:0:0: rejecting I/O to offline device
[ 1472.184061] sd 0:0:0:0: [sda] Unhandled error code
[ 1472.184081] sd 0:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00
[ 1472.184100] sd 0:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 09 04 08 90 00 00 08 00
[ 1472.184139] end_request: I/O error, dev sda, sector 151259280
[ 1472.184159] Buffer I/O error on device sda1, logical block 18907154
[ 1472.184172] lost page write due to I/O error on sda1
[ 1472.184247] usb 1-1.3: USB disconnect, device number 4
[ 1472.190565] Buffer I/O error on device sda1, logical block 3994816
[ 1472.190601] Buffer I/O error on device sda1, logical block 3994817
[ 1472.190619] Buffer I/O error on device sda1, logical block 3994818
Attempts to fix it
- I thought at first it may be the HDD I was using (the Converter working on both Linux and Windows and various devices without issue), but after trying an IDE, SATA and 2.5" SATA drive all exhibited the issue. So not the converter and not the drive.
- I thought will all the USB interupts in the Pi > 6000/s perhaps I needed to over clock to ensure there was sufficient processing resource to service the interrupts. Tried this, I'm not convinced there was any difference.
- The famous power issues (any goes wrong with a Raspberry Pi people immediate blame volt drop) - wasn't that. I used external power and monitored the 5v lines. No issue there.
- Finally I ordered a new converter and this seems to have (thus far) been more stable.