diff options
-rw-r--r-- | drivers/target/target_core_spc.c | 14 |
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: | |||
760 | return 20; | 760 | return 20; |
761 | } | 761 | } |
762 | 762 | ||
763 | static int spc_modesense_informational_exceptions(struct se_device *dev, u8 pc, unsigned char *p) | ||
764 | { | ||
765 | p[0] = 0x1c; | ||
766 | p[1] = 0x0a; | ||
767 | |||
768 | /* No changeable values for now */ | ||
769 | if (pc == 1) | ||
770 | goto out; | ||
771 | |||
772 | out: | ||
773 | return 12; | ||
774 | } | ||
775 | |||
763 | static struct { | 776 | static struct { |
764 | uint8_t page; | 777 | uint8_t page; |
765 | uint8_t subpage; | 778 | uint8_t subpage; |
@@ -768,6 +781,7 @@ static struct { | |||
768 | { .page = 0x01, .subpage = 0x00, .emulate = spc_modesense_rwrecovery }, | 781 | { .page = 0x01, .subpage = 0x00, .emulate = spc_modesense_rwrecovery }, |
769 | { .page = 0x08, .subpage = 0x00, .emulate = spc_modesense_caching }, | 782 | { .page = 0x08, .subpage = 0x00, .emulate = spc_modesense_caching }, |
770 | { .page = 0x0a, .subpage = 0x00, .emulate = spc_modesense_control }, | 783 | { .page = 0x0a, .subpage = 0x00, .emulate = spc_modesense_control }, |
784 | { .page = 0x1c, .subpage = 0x00, .emulate = spc_modesense_informational_exceptions }, | ||
771 | }; | 785 | }; |
772 | 786 | ||
773 | static void spc_modesense_write_protect(unsigned char *buf, int type) | 787 | static void spc_modesense_write_protect(unsigned char *buf, int type) |