target: Return ABORTED_COMMAND sense key for PI errors
authorSagi Grimberg <sagig@mellanox.com>
Wed, 8 Jul 2015 14:58:54 +0000 (17:58 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 24 Jul 2015 05:11:32 +0000 (22:11 -0700)
PI errors were reported with ILLEGAL_REQUEST sense key but
there was actually no problem with the request. Target
detected PI errors should be reported with aborted command
sense key.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c

index f528a9def65a83d4b839317cc2330ccea451b52d..2bece607ca0f93a4ded61bf449746d544a0fac64 100644 (file)
@@ -2700,19 +2700,19 @@ static const struct sense_info sense_info_table[] = {
                .ascq = 0x00,
        },
        [TCM_LOGICAL_BLOCK_GUARD_CHECK_FAILED] = {
-               .key = ILLEGAL_REQUEST,
+               .key = ABORTED_COMMAND,
                .asc = 0x10,
                .ascq = 0x01, /* LOGICAL BLOCK GUARD CHECK FAILED */
                .add_sector_info = true,
        },
        [TCM_LOGICAL_BLOCK_APP_TAG_CHECK_FAILED] = {
-               .key = ILLEGAL_REQUEST,
+               .key = ABORTED_COMMAND,
                .asc = 0x10,
                .ascq = 0x02, /* LOGICAL BLOCK APPLICATION TAG CHECK FAILED */
                .add_sector_info = true,
        },
        [TCM_LOGICAL_BLOCK_REF_TAG_CHECK_FAILED] = {
-               .key = ILLEGAL_REQUEST,
+               .key = ABORTED_COMMAND,
                .asc = 0x10,
                .ascq = 0x03, /* LOGICAL BLOCK REFERENCE TAG CHECK FAILED */
                .add_sector_info = true,