On Mon, Dec 23, 2013 at 02:54:42PM +0100, J. Hannken-Illjes wrote: > > LTFS20010D SCSI request: [ 08 02 01 00 00 00 ] Requested length=65536 > > LTFS20089D Driver detail: errno = 0x0 > > LTFS20089D Driver detail: status = 0x2 > > LTFS20089D Driver detail: retsts = 0x4 > > LTFS20089D Driver detail: error = 0x0 > > This is XS_SHORTSENSE (it also matches retsts being 0x04).
Is it? I found 08 was READ(6) here: http://en.wikipedia.org/wiki/SCSI_commands I added a REQUEST_SENSE command after the failure, and here I am: LTFS20012D SCSI sense : 70 00 05 00 00 00 00 10 00 00 00 00 24 00 00 CC 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 If I read it correctly, this is: 5-24-00 Illegal Request - invalid field in CDB (Command Descriptor Block) I do not know how to decode the key specific data: CC 00 01 The READ(6) command is assembled this way (silion is passed from a bool named unusal_size). The field usage does not fit what Wikipedia says about that command. static int _cdb_read(void *device, char *buf, size_t count, bool silion) { ltotape_scsi_io_type *sio = (ltotape_scsi_io_type*)device; int status; /* * Set up the cdb: */ sio->cdb[0] = CMDread; sio->cdb[1] = (silion) ? 0x02 : 0x00; sio->cdb[2] = (unsigned char) (count >> 16 ); sio->cdb[3] = (unsigned char) (count >> 8 ); sio->cdb[4] = (unsigned char) (count & 0xFF); sio->cdb[5] = 0; sio->cdb_length = 6; /* six-byte cdb */ (...) -- Emmanuel Dreyfus [email protected]
