Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ssc: MODE SELECT - Return sense error on page codes not handled by MO…

…DE SELECT

Correct fix here would be to update MODE SELECT to support all mode pages the target
understands, instead of only DATA COMPRESSION, DEVICE CONFIGURATION and
EXTENDED DEVICE CONFIGURATION.

It's on the TODO list.

Signed-off-by: Mark Harvey <markh794@gmail.com>
  • Loading branch information...
commit 24ae6864b9fb95b871b81c5235bba5fc9d555aea 1 parent 6611b13
@markh794 authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 usr/ssc.c
View
7 usr/ssc.c
@@ -925,13 +925,16 @@ uint8_t ssc_mode_select(struct scsi_cmd *cmd)
default:
MHVTL_DBG_PRT_CDB(1, cmd);
- MHVTL_DBG(1, "Mode page 0x%02x not handled", page);
+ MHVTL_LOG("Mode page 0x%02x not handled", page);
+ mkSenseBuf(ILLEGAL_REQUEST, E_INVALID_FIELD_IN_PARMS,
+ sam_stat);
+ return SAM_STAT_CHECK_CONDITION;
break;
}
if (page_len == 0) { /* Something wrong with data structure */
page_len = cmd->dbuf_p->sz;
MHVTL_LOG("Problem with mode select data structure");
- mkSenseBuf(ILLEGAL_REQUEST, E_INVALID_FIELD_IN_CDB,
+ mkSenseBuf(ILLEGAL_REQUEST, E_INVALID_FIELD_IN_PARMS,
sam_stat);
return SAM_STAT_CHECK_CONDITION;
}
Please sign in to comment.
Something went wrong with that request. Please try again.