On Fri, 28 Nov 2003, Stefano Barbato wrote: > > That's not an error. 36 bytes is the normal length of an INQUIRY > > response. I'm not quite sure why the driver asks for 255 bytes; under 2.6 > > it only asks for 36. The FIX_INQUIRY flag isn't needed. > > INQUIRY len seems to be (errouneously?) hardcoded into scsi layer: > > 2.4.22 [scsi_scan.c:589] > --------- > scsi_cmd[0] = INQUIRY; > [.....] > scsi_cmd[4] = 255; > --------- > > 2.6 [scsi_scan.c:333] > --------- > scsi_cmd[0] = INQUIRY; > scsi_cmd[4] = 36; /* issue conservative alloc_length */ > ---------
That's not an error either. An INQUIRY command is allowed to use a very big buffer. If the device doesn't have that much data, it only sends what it has. > So the problem is this other reader that successfully (but not correctly if > the INQ is only 36 bytes long!) transfer all 255 bytes: > ============================= > Nov 26 17:16:06 epia kernel: usb-storage: *** thread awakened. > Nov 26 17:16:06 epia kernel: usb-storage: Command INQUIRY (6 bytes) > Nov 26 17:16:06 epia kernel: usb-storage: 12 00 00 00 ff 00 1b c0 84 67 5e c5 > Nov 26 17:16:06 epia kernel: usb-storage: Bulk command S 0x43425355 T 0x1 Trg > 0 LUN 0 L 255 F 128 CL 6 > Nov 26 17:16:06 epia kernel: usb-storage: Bulk command transfer result=0 > Nov 26 17:16:06 epia kernel: usb-storage: usb_stor_transfer_partial(): xfer > 255 bytes > Nov 26 17:16:06 epia kernel: usb-storage: usb_stor_bulk_msg() returned 0 > xferred 255/255 > Nov 26 17:16:06 epia kernel: usb-storage: usb_stor_transfer_partial(): > transfer complete > Nov 26 17:16:06 epia kernel: usb-storage: Bulk data transfer result 0x0 > Nov 26 17:16:06 epia kernel: usb-storage: Attempting to get CSW... > Nov 26 17:16:06 epia kernel: usb-storage: Bulk status result = 0 > Nov 26 17:16:06 epia kernel: usb-storage: Bulk status Sig 0x53425355 T 0x1 R 0 > Stat 0x0 > Nov 26 17:16:06 epia kernel: usb-storage: Fixing INQUIRY data to show SCSI rev > 2 - was 0 > Nov 26 17:16:06 epia kernel: usb-storage: scsi cmd done, result=0x0 > Nov 26 17:16:06 epia kernel: usb-storage: *** thread sleeping. > > =============================k > > stefano Even that isn't a problem. The SCSI layer ignores everything after the first 36 bytes of the INQUIRY response. Alan Stern ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
