diff options
author | Arun Easi <arun.easi@qlogic.com> | 2011-08-16 14:29:23 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:13:52 -0400 |
commit | e02587d777bfb398f70709fd3a92fa0154959003 (patch) | |
tree | 41f590c4cce0d636c70ab265ea7313abed833f6c /drivers/scsi/qla2xxx/qla_isr.c | |
parent | 8cb2049c744809193ed3707a37c09676a24599ee (diff) |
[SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.
This fix:
- Disables app tag peeking; correct tag check will be added when the
SCSI API is available.
- Always derive ref_tag from scsi_get_lba()
- Removes incorrect swap of FCP_LUN in FCP_CMND
- Moves app-tag error check before ref-tag check. The reason being,
currently there is no interface in SCSI to retrieve the app-tag
for protection I/Os, so driver puts zero for app-tag in the
firmware interface, but requests not to validate it, but when a
ref-tag error is detected by firmware, it would put
expected/actual tags for all the protection tags (guard/app/ref).
As driver checks for app tag error first, a ref-tag error is
incorrectly flagged as app-tag error.
- Convert HBA specific checks to capability based.
Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 53339f10a598..ec53e87781a5 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -1534,25 +1534,26 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24) | |||
1534 | return 1; | 1534 | return 1; |
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | /* check appl tag */ | 1537 | /* check ref tag */ |
1538 | if (e_app_tag != a_app_tag) { | 1538 | if (e_ref_tag != a_ref_tag) { |
1539 | scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, | 1539 | scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, |
1540 | 0x10, 0x2); | 1540 | 0x10, 0x3); |
1541 | set_driver_byte(cmd, DRIVER_SENSE); | 1541 | set_driver_byte(cmd, DRIVER_SENSE); |
1542 | set_host_byte(cmd, DID_ABORT); | 1542 | set_host_byte(cmd, DID_ABORT); |
1543 | cmd->result |= SAM_STAT_CHECK_CONDITION << 1; | 1543 | cmd->result |= SAM_STAT_CHECK_CONDITION << 1; |
1544 | return 1; | 1544 | return 1; |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | /* check ref tag */ | 1547 | /* check appl tag */ |
1548 | if (e_ref_tag != a_ref_tag) { | 1548 | if (e_app_tag != a_app_tag) { |
1549 | scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, | 1549 | scsi_build_sense_buffer(1, cmd->sense_buffer, ILLEGAL_REQUEST, |
1550 | 0x10, 0x3); | 1550 | 0x10, 0x2); |
1551 | set_driver_byte(cmd, DRIVER_SENSE); | 1551 | set_driver_byte(cmd, DRIVER_SENSE); |
1552 | set_host_byte(cmd, DID_ABORT); | 1552 | set_host_byte(cmd, DID_ABORT); |
1553 | cmd->result |= SAM_STAT_CHECK_CONDITION << 1; | 1553 | cmd->result |= SAM_STAT_CHECK_CONDITION << 1; |
1554 | return 1; | 1554 | return 1; |
1555 | } | 1555 | } |
1556 | |||
1556 | return 1; | 1557 | return 1; |
1557 | } | 1558 | } |
1558 | 1559 | ||