summaryrefslogtreecommitdiff
path: root/drivers/target
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-10-31 09:16:49 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2012-11-06 20:55:46 -0800
commit0f6d64cee9c518f5d3138a90cead62fba2031074 (patch)
treee4b0b43d31c9b1651b20549b504f917f36ae5aea /drivers/target
parentd4b2b867193c157f0ac8c10137e287a90ed4e5d5 (diff)
target: Implement mode page 0x1c, "Informational Exceptions"
The Windows SCSI compliance test asks for this mode page, and it's easy to implement: we can just return all 0s to show we don't support any of these features. Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_spc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index 8ccfe00c51d7..6c10fce9ef09 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -760,6 +760,19 @@ out:
return 20;
}
+static int spc_modesense_informational_exceptions(struct se_device *dev, u8 pc, unsigned char *p)
+{
+ p[0] = 0x1c;
+ p[1] = 0x0a;
+
+ /* No changeable values for now */
+ if (pc == 1)
+ goto out;
+
+out:
+ return 12;
+}
+
static struct {
uint8_t page;
uint8_t subpage;
@@ -768,6 +781,7 @@ static struct {
{ .page = 0x01, .subpage = 0x00, .emulate = spc_modesense_rwrecovery },
{ .page = 0x08, .subpage = 0x00, .emulate = spc_modesense_caching },
{ .page = 0x0a, .subpage = 0x00, .emulate = spc_modesense_control },
+ { .page = 0x1c, .subpage = 0x00, .emulate = spc_modesense_informational_exceptions },
};
static void spc_modesense_write_protect(unsigned char *buf, int type)