mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
scst: Fix MAINTENANCE IN parsing
Although I do not know of any initiator that asks for the extended parameter data format when submitting a REPORT TARGET PORT GROUPS command, I think it's a good idea to support that data format (i.e. three most significant bits of the second CDB byte are 001 instead of 000). The attached patch should implement that. Additionally, cmd->op_name is set to something more descriptive than "MAINTENANCE IN" in that patch. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -6497,9 +6497,14 @@ out:
|
||||
static int get_cdb_info_min(struct scst_cmd *cmd,
|
||||
const struct scst_sdbops *sdbops)
|
||||
{
|
||||
switch (cmd->cdb[1]) {
|
||||
switch (cmd->cdb[1] & 0x1f) {
|
||||
case MI_REPORT_IDENTIFYING_INFORMATION:
|
||||
case MI_REPORT_TARGET_PGS: /* REPORT TARGET PORT GROUPS */
|
||||
cmd->op_name = "REPORT IDENTIFYING INFORMATION";
|
||||
cmd->op_flags |= SCST_REG_RESERVE_ALLOWED |
|
||||
SCST_WRITE_EXCL_ALLOWED | SCST_EXCL_ACCESS_ALLOWED;
|
||||
break;
|
||||
case MI_REPORT_TARGET_PGS:
|
||||
cmd->op_name = "REPORT TARGET PORT GROUPS";
|
||||
cmd->op_flags |= SCST_REG_RESERVE_ALLOWED |
|
||||
SCST_WRITE_EXCL_ALLOWED | SCST_EXCL_ACCESS_ALLOWED;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user