[stgt] [PATCH 06/15] ssc: add MODE SELECT support

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Sun Oct 5 16:37:36 CEST 2008


Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
 usr/ssc.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/usr/ssc.c b/usr/ssc.c
index 6c8b51f..2d45eb2 100644
--- a/usr/ssc.c
+++ b/usr/ssc.c
@@ -45,6 +45,17 @@ static inline uint32_t ssc_get_block_length(struct scsi_lu *lu)
 	return get_unaligned_be24(lu->mode_block_descriptor + 5);
 }
 
+static int ssc_mode_page_update(struct scsi_cmd *cmd, uint8_t *data,
+				int *changed)
+{
+	return 1;
+}
+
+static int ssc_mode_select(int host_no, struct scsi_cmd *cmd)
+{
+	return spc_mode_select(host_no, cmd, ssc_mode_page_update);
+}
+
 static int ssc_rw(int host_no, struct scsi_cmd *cmd)
 {
 	int ret;
@@ -180,7 +191,7 @@ static struct device_type_template ssc_template = {
 		{spc_inquiry,},
 		{spc_illegal_op,},
 		{spc_illegal_op,},
-		{spc_illegal_op,},
+		{ssc_mode_select,},
 		{spc_illegal_op,},
 		{spc_illegal_op,},
 
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list