Permalink
Browse files

ssc: add and use page variable in ssc_mode_select

Add and use page variable in ssc_mode_select.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Mark Harvey <markh794@gmail.com>
  • Loading branch information...
1 parent 3cad78f commit 40c51ba15b295d014356f403767f73c924b2b7ed Sebastian Herbszt committed with Apr 1, 2013
Showing with 6 additions and 2 deletions.
  1. +6 −2 usr/ssc.c
View
@@ -784,6 +784,7 @@ uint8_t ssc_mode_select(struct scsi_cmd *cmd)
int save_pages;
int page_format;
int mselect_6 = 0;
+ int page;
save_pages = cmd->scb[1] & 0x01;
page_format = (cmd->scb[1] & (1 << 4)) ? 1 : 0;
@@ -879,9 +880,12 @@ uint8_t ssc_mode_select(struct scsi_cmd *cmd)
i+24,
buf[i+24], buf[i+25], buf[i+26], buf[i+27],
buf[i+28], buf[i+29], buf[i+30], buf[i+31]);
+
+ page = buf[i];
+ MHVTL_DBG(2, "Page: 0x%02x", page);
/* Default page len is, override if sub-pages */
page_len = buf[i + 1];
- switch (buf[i]) {
+ switch (page) {
case MODE_DATA_COMPRESSION:
set_mode_compression(cmd, &buf[i]);
break;
@@ -904,7 +908,7 @@ 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", buf[i]);
+ MHVTL_DBG(1, "Mode page 0x%02x not handled", page);
break;
}
if (page_len == 0) { /* Something wrong with data structure */

0 comments on commit 40c51ba

Please sign in to comment.