Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344732
b: refs/heads/master
c: 0f6d64c
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier authored and Nicholas Bellinger committed Nov 7, 2012
1 parent a891880 commit d7b26a1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4b2b867193c157f0ac8c10137e287a90ed4e5d5
refs/heads/master: 0f6d64cee9c518f5d3138a90cead62fba2031074
14 changes: 14 additions & 0 deletions trunk/drivers/target/target_core_spc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit d7b26a1

Please sign in to comment.