Permalink
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...
1 parent 6611b13 commit 24ae6864b9fb95b871b81c5235bba5fc9d555aea @markh794 committed Apr 4, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 usr/ssc.c
View
@@ -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;
}

0 comments on commit 24ae686

Please sign in to comment.