Re: [PATCH v2 0/7] scsi: scsi_debug: Add more tape support

Martin K. Petersen
2025-02-25T01:44:39Z

Hi Kai!

> The command definitions in scsi_debug are common to all devices.

RSOC allows the device to report which fields in a given command are
valid (identified as "Usage data" below).

# sg_opcodes -o 0x8 /dev/sda

Opcode=0x08
Command_name: Read(6)
Command is supported [conforming to SCSI standard]
No command duration limit mode page
Multiple Logical Units (MLU): not reported
Usage data: 08 ff ff ff ff c7

SBC Read(6) and an SSC Read(6) don't have the exact same fields. And
consequently RSOC won't return the correct usage data for Read(6) in
tape mode. CDB byte 1 for tape should be 0x3 (SILI|FIXED) not 0xff
(Which I actually think is a bug, it should be 0x1f for SBC Read(6)
since bits 5-7 are reserved)).

Anyway. It's purely cosmetic. Nothing depends on this in practice, I
don't think.

--
Martin K. Petersen Oracle Linux Engineering