The attached Matthew Dharm patch (which should probably be in 2.6.8 per Alan Stern) fixed the problem for 2.6.5, 2.6.6 and all 2.6.7 varieties. There were no problems with 2.6.4.
The patch seems to make the MODE_SENSE command (try to) transfer 192 bytes rather than 4 bytes - results in "babble" since actual transfer length seems to be 8. After the data overrun, various combinations of [khubd], [usb-storage], and [scsi_eh_?] deadlock and the hub is effectively dead; attempted resets don't work.
Alan, I continue to look at this without much success and no consistency.
The one thing that seems consistent is that the babble (and subsequent software failures) always occur after a MODE_SENSE that requests 4 bytes; and my hardware returns 8 bytes; e.g.:
Jun 22 19:40:33 darkstar kernel: usb-storage: Command MODE_SENSE (6 bytes)
Jun 22 19:40:33 darkstar kernel: usb-storage: 1a 00 3f 00 04 00
Jun 22 19:40:33 darkstar kernel: usb-storage: Bulk Command S 0x43425355 T 0x23 L 4 F 128 Trg 0 LUN 0 CL 6
Jun 22 19:40:33 darkstar kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
Jun 22 19:40:33 darkstar kernel: usb-storage: Status code 0; transferred 31/31
Jun 22 19:40:33 darkstar kernel: usb-storage: -- transfer complete
Jun 22 19:40:33 darkstar kernel: usb-storage: Bulk command transfer result=0
Jun 22 19:40:33 darkstar kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 4 bytes
Jun 22 19:40:33 darkstar kernel: usb-storage: Status code -75; transferred 4/4
Jun 22 19:40:33 darkstar kernel: usb-storage: -- babble
The way the Dharm's patch seems to work for me is to cause the MODE_SENSE to request 192 bytes - results in a short reply but that seems not to matter:
Jun 22 20:28:49 darkstar kernel: usb-storage: Command MODE_SENSE (6 bytes)
Jun 22 20:28:49 darkstar kernel: usb-storage: 1a 00 3f 00 c0 00
Jun 22 20:28:49 darkstar kernel: usb-storage: Bulk Command S 0x43425355 T 0x25 L 192 F 128 Trg 0 LUN 0 CL 6
Jun 22 20:28:49 darkstar kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
Jun 22 20:28:49 darkstar kernel: usb-storage: Status code 0; transferred 31/31
Jun 22 20:28:49 darkstar kernel: usb-storage: -- transfer complete
Jun 22 20:28:49 darkstar kernel: usb-storage: Bulk command transfer result=0
Jun 22 20:28:49 darkstar kernel: usb-storage: usb_stor_bulk_transfer_buf: xfer 192 bytes
Jun 22 20:28:49 darkstar kernel: usb-storage: Status code 0; transferred 8/192
Jun 22 20:28:49 darkstar kernel: usb-storage: -- short transfer
Jun 22 20:28:49 darkstar kernel: usb-storage: Bulk data transfer result 0x1
Is it possible that the 8 byte return (when 4 were requested) overruns a buffer somewhere and clobbers some data, resulting in subsequent errors? This is the only type of error I can think of that might explain the observed erratic behavior.
I believe I saw an 8-byte MODE_SENSE request in 2.6.4 (which didn't have the problem) but can not reproduce this. Also, I have been unable to reproduce the Medium not present errors I saw in one test!
And I have not recently found a case where the MODE_SENSE is sent at all when everything is working.
Phil
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel