>From 6ea07a536dcc3fe89f11d46bfadd3cafca75c911 Mon Sep 17 00:00:00 2001
From: Mark Harvey <[EMAIL PROTECTED]>
Date: Tue, 19 Aug 2008 09:41:47 +1000
Subject: Implement smc INITIALIZE ELEMENT STATUS WITH RANGE as NO-OP

Signed-off-by: Mark Harvey <[EMAIL PROTECTED]>
---
 usr/smc.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/usr/smc.c b/usr/smc.c
index a04e905..d2dda4f 100644
--- a/usr/smc.c
+++ b/usr/smc.c
@@ -225,6 +225,22 @@ static int build_element_descriptors(uint8_t *data, struct 
list_head *head,
 }
 
 /**
+ * smc_initialize_element_status with range
+ *                      - INITIALIZE ELEMENT STATUS WITH RANGE op code
+ *
+ * Support the SCSI op code INITIALIZE_ELEMENT_STATUS_WITH_RANGE
+ * Ref: smc3r11, 6.5
+ */
+static int smc_initialize_element_status_range(int host_no, struct scsi_cmd 
*cmd)
+{
+       /*
+        * Should do some error checking here ... the spec says some stuff
+        * about having a reservation
+        */
+       return SAM_STAT_GOOD;
+}
+
+/**
  * smc_initialize_element_status - INITIALIZE ELEMENT STATUS op code
  *
  * Some backup libraries seem to require this.
@@ -795,7 +811,28 @@ struct device_type_template smc_template = {
                {spc_illegal_op,},
                {spc_illegal_op,},
 
-               [0x20 ... 0x4f] = {spc_illegal_op,},
+               [0x20 ... 0x2f] = {spc_illegal_op,},
+
+               /* 0x30 */
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {smc_initialize_element_status_range,},
+
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+               {spc_illegal_op,},
+
+               [0x40 ... 0x4f] = {spc_illegal_op,},
 
                /* 0x50 */
                {spc_illegal_op,},
-- 
1.5.4.3

_______________________________________________
Stgt-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/stgt-devel

Reply via email to