target: Print subpage too for unhandled MODE SENSE pages
authorRoland Dreier <roland@purestorage.com>
Fri, 12 Aug 2011 17:01:24 +0000 (10:01 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 22 Aug 2011 19:26:31 +0000 (19:26 +0000)
Make a log message more useful by printing both the page and subpage
that an initiator is requesting.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_cdb.c

index 40ad142f7cb3cc928658b64b77d434512faf929b..89ae923c5da6e28362039fe2fd6a611459747752 100644 (file)
@@ -920,8 +920,8 @@ target_emulate_modesense(struct se_cmd *cmd, int ten)
                length += target_modesense_control(dev, &buf[offset+length]);
                break;
        default:
-               pr_err("Got Unknown Mode Page: 0x%02x\n",
-                               cdb[2] & 0x3f);
+               pr_err("MODE SENSE: unimplemented page/subpage: 0x%02x/0x%02x\n",
+                      cdb[2] & 0x3f, cdb[3]);
                return PYX_TRANSPORT_UNKNOWN_MODE_PAGE;
        }
        offset += length;