On Fri, 10 Sep 2004, Phani Babu G. wrote: > Hi All, > > I am having problems writig data to a 64 MB direct > access device (LEXAR make). I use SG_IO ioctl provided > by SCSI Generic (sg) to access the USB Mass Storage > device. After issuing WRITE_10 command the SCSI genric > driver freezes. The linux kernel version is 2.4.20. On > the other hand SCSI READ_10 commands succeed using the > same ioctl. > > Traces.......... > > usb-storage: queuecommand() called > usb-storage: *** thread awakened. > usb-storage: Command WRITE_10 (10 bytes) > usb-storage: 2a 00 00 00 00 00 00 00 08 00 00 00 > usb-storage: Bulk command S 0x43425355 T 0x86 Trg 0 > LUN 0 L 512 F 0 CL 10
Your WRITE(10) command has a transfer length of 8 blocks (the eighth and ninth bytes in the command block above), but you have specified a total transfer length of 512 bytes or just one block (the L 512 above). No wonder the device doesn't like it! Either the total transfer length should be changed 4096 bytes or the ninth command byte should be changed to 0x01. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel