提交 0f6d64ce 编写于 作者: R Roland Dreier 提交者: Nicholas Bellinger

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: NRoland Dreier <roland@purestorage.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 d4b2b867
......@@ -760,6 +760,19 @@ static int spc_modesense_caching(struct se_device *dev, u8 pc, u8 *p)
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册