On Wed, 28 Jun 2006, JackRain wrote: > linux-usb-users£¬ÄúºÃ£¡ > > hi,glad to see you again:) > > i would like to ask a question about £º how does mass > storage device cope with unsupported commands,such as 0x23 etc?
Many mass storage devices do support that command. It is documented in the UFI specification. > my way is : refering to mass bulk-only spec.(usbmassbulk_10 > 6.6.4 command failure), > > The device shall report this condition by returning a Command > Failed status (bCSWStatus = 01h). > > so,i now try : > > 1) return with sense_data 6th,12th,13th: > 0x5,0x24,0x00. You can't return sense data to the host unless the command was REQUEST SENSE. > 2) return CSW with status (0x01) fail. > > but it seems from bus hound that ,the USB commnication halt a long > time then reset. What mass storage device are you talking about? Do you have any logs you can post? > another method i have tried is to stall the bulk-in endpoint > then wait host __set feature__ and unstall endpoint. > > this failed again~ > > could anyone tell me the correct way ?? thank you very much~ According to the specification, you are supposed to stall the bulk-in endpoint (if the Direction bit was set in bmCBWFlags; otherwise you should stall the bulk-out endpoint) and then return CSW status = 1. When the host then sends a REQUEST SENSE command, you should reply with key = 0x5, ASC = 0x24, ASCQ = 0x00. Alan Stern Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users