mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 22:26:23 +00:00
scst: Fail unsupported commands properly
Report UNSUPPORTED OPCODE instead of ILLEGAL_REQUEST / LBA_OUT_OF_RANGE for unsupported opcodes. For unsupported commands the SCST_LBA_NOT_VALID flag is not set and cmd->lba == 0xffffffffffffffffU. That causes the test in scst_generic_parse() for out-of-range LBA's to trigger. Avoid that by explicitly setting the SCST_LBA_NOT_VALID flag for unsupported opcodes. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5076 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -6843,6 +6843,7 @@ int scst_get_cdb_info(struct scst_cmd *cmd)
|
||||
/* opcode not found or now not used */
|
||||
TRACE(TRACE_MINOR, "Unknown opcode 0x%x for type %d", op,
|
||||
dev_type);
|
||||
cmd->op_flags |= SCST_LBA_NOT_VALID;
|
||||
res = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user