aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-07-26 19:59:00 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-08-16 20:50:02 -0400
commiteb39d34004888afcc0a44d9c36383cd69fa3b3b9 (patch)
treead00a2a971d35afc7005fc412d6bc46dcaa88f9a /drivers/target
parent93ee7a9340d64f20295aacc3fb6a22b759323280 (diff)
target: Change TCM_NON_EXISTENT_LUN response to ASC=LOGICAL UNIT NOT SUPPORTED
This patch changes transport_send_check_condition_and_sense() for TCM_NON_EXISTENT_LUN emulation to use 0x25 (LOGICAL UNIT NOT SUPPORTED) instead of the original 0x20 (INVALID COMMAND OPERATION CODE). This is helpful to distinguish between TCM_UNSUPPORTED_SCSI_OPCODE ASC=0x20 exceptions. Signed-off-by: Nicholas A. Bellinger <nab@risingtidesystems.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_transport.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 89760329d5d0..cc5a339d4d5a 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -4726,6 +4726,13 @@ int transport_send_check_condition_and_sense(
4726 */ 4726 */
4727 switch (reason) { 4727 switch (reason) {
4728 case TCM_NON_EXISTENT_LUN: 4728 case TCM_NON_EXISTENT_LUN:
4729 /* CURRENT ERROR */
4730 buffer[offset] = 0x70;
4731 /* ILLEGAL REQUEST */
4732 buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
4733 /* LOGICAL UNIT NOT SUPPORTED */
4734 buffer[offset+SPC_ASC_KEY_OFFSET] = 0x25;
4735 break;
4729 case TCM_UNSUPPORTED_SCSI_OPCODE: 4736 case TCM_UNSUPPORTED_SCSI_OPCODE:
4730 case TCM_SECTOR_COUNT_TOO_MANY: 4737 case TCM_SECTOR_COUNT_TOO_MANY:
4731 /* CURRENT ERROR */ 4738 /* CURRENT ERROR */