On Wed, 25 Jan 2006, Steve Calfee wrote: > When I press eject to a usb flash connected through a hub, I get a > continuous flow of normal traffic including an occasional: > frame #1370 f=12001 sync 114992 SOF(xa5) frame 1370 crc5=0x1d f=0 > f=07084 sync 115000 OUT(xe1) addr 2 endp 1 crc5=0x3 > f=07122 sync 115000 DATA0(xc3) 0x55 0x53 0x42 0x43 0xd0 0x76 0x23 0x84 > 0x00 0x00 0x00 0x00 0x00 0x00 0x06 0x00 > 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 > 0x00 0x00 0x00 0x00 0x00 0x00 0X00 crc=0x3914 > f=07411 sync 115000 ACK(xd2) > > This is a test unit ready scsi command > > f=10797 sync 115052 IN(x69) addr 2 endp 2 crc5=0x10 > f=10837 sync 115052 DATA0(xc3) 0x55 0x53 0x42 0x53 0xd0 0x76 0x23 0x84 > 0x00 0x00 0x00 0x00 0X01 crc=0x3f8e > f=10981 sync 115052 ACK(xd2) > > > And the returned status says Recovered error?? - I don't know what that > means.
It's not "recovered error"; it means that the command failed for some reason. Since the command was TEST UNIT READY, its failure means the device isn't ready for reading. > frame #1371 f=12002 sync 115086 SOF(xa5) frame 1371 crc5=0x2 f=0 > frame #1371 f=01411 sync 115094 OUT(xe1) addr 2 endp 1 crc5=0x3 > f=01450 sync 115094 DATA1(x4b) 0x55 0x53 0x42 0x43 0xd0 0x76 0x23 0x84 > 0x12 0x00 0x00 0x00 0x80 0x00 0x0c 0x03 > 0x00 0x00 0x00 0x12 0x00 0x00 0x00 0x00 > 0x00 0x00 0x00 0x00 0x00 0x00 0X00 crc=0xf937 > f=01739 sync 115094 ACK(xd2) > > 12 is an inquiry command Yes, but this command code is 0x03 (the data length is 0x12), which is REQUEST SENSE. > f=04240 sync 115146 IN(x69) addr 2 endp 2 crc5=0x10 > f=04280 sync 115146 DATA1(x4b) 0x70 0x00 0x02 0x00 0x00 0x00 0x00 0x0a > 0x00 0x00 0x00 0x00 0x3a 0x00 0x00 0x00 > 0x00 0x00 crc=0x2331 > f=04463 sync 115146 ACK(xd2) > > I haven't been able to figure out how to decode this inquiry response > data. It's sense data. The sense key is 2 and the ASC is 0x3a, meaning Not ready, medium not present. > f=07204 sync 115186 IN(x69) addr 2 endp 2 crc5=0x10 > f=07244 sync 115186 DATA0(xc3) 0x55 0x53 0x42 0x53 0xd0 0x76 0x23 0x84 > 0x00 0x00 0x00 0x00 0X00 crc=0xff4f > f=07389 sync 115186 ACK(xd2) > > And the status says 0=GOOD?? Because the REQUEST SENSE command completed successfully. > This is repeated every second forever, but just using the test unit > ready command after awhile. The SOFs continue even while the device is > "ejected". Note that WinXP leaves the "safe removal" mechanism active > for a usb device in this condition. Evidently Windows is polling the device, testing to see when new media is inserted. > Now when I press the "safe removal" button in WinXP it shows: > > frame # 549 f=12002 sync 23888 SOF(xa5) frame 549 crc5=0x1 f=0 > frame # 550 f=12001 sync 23896 SOF(xa5) frame 550 crc5=0x9 f=0 > frame # 551 f=12002 sync 23904 SOF(xa5) frame 551 crc5=0x16 f=0 > frame # 552 f=12001 sync 23912 SOF(xa5) frame 552 crc5=0x17 f=0 > BUS timeout 100ms idle FS 23920 > BUS timeout 100ms idle FS 23922 > BUS timeout 100ms idle FS 23924 > BUS timeout 100ms idle FS 23926 > BUS timeout 100ms idle FS 23928 > BUS timeout 100ms idle FS 23930 > BUS timeout 100ms idle FS 23932 > BUS timeout 100ms idle FS 23934 > BUS timeout 100ms idle FS 23936 > BUS timeout 100ms idle FS 23938 > BUS timeout 100ms idle FS 23940 > BUS timeout 100ms idle FS 23942 > BUS timeout 100ms idle FS 23944 > BUS timeout 100ms idle FS 23946 > BUS timeout 100ms idle FS 23948 > > This shows that the hub did not put the port in reset (as I misreported > earlier). It just puts the port in suspend - which is probably just > disabling the port, the device keeps pulling up its speed indicator > resistor. And devices are supposed to suspend themselves after 2 ms of > no bus activity. This shows the difference between "eject" and "safely remove". "Eject" means taking the medium out of the drive, for example, removing a flash card from a card reader. The device itself is still connected. "Safely remove" means to unplug the USB cable, thereby disconnecting the entire device. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel