target: use correct sense code for LUN communication failure
authorHannes Reinecke <hare@suse.de>
Mon, 17 Dec 2012 08:53:32 +0000 (09:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jun 2014 19:04:21 +0000 (12:04 -0700)
commit 18a9df42d53fabfa43b78be1104838cc8b9762e1 upstream.

The ASC/ASCQ code for 'Logical Unit Communication failure' is
0x08/0x00; 0x80/0x00 is vendor specific.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: Nicholas Bellinger <nab@risingtidesystems.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
[bwh: Backported to 3.2: add offset to buffer index]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Rui Xiang <rui.xiang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_transport.c

index 50519b2f12b0cc897454a5ea8d8b0a40b96028f6..34df0b2a630e42537a53d4dd1b2d04bde57b61f7 100644 (file)
@@ -4702,7 +4702,7 @@ int transport_send_check_condition_and_sense(
                /* ILLEGAL REQUEST */
                buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
                /* LOGICAL UNIT COMMUNICATION FAILURE */
-               buffer[offset+SPC_ASC_KEY_OFFSET] = 0x80;
+               buffer[offset+SPC_ASC_KEY_OFFSET] = 0x08;
                break;
        }
        /*