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_inline.h | |
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_inline.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_inline.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index c06e5f9b431e..9902834e0b74 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h | |||
@@ -104,9 +104,17 @@ qla2x00_set_fcport_state(fc_port_t *fcport, int state) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | static inline int | 106 | static inline int |
107 | qla2x00_hba_err_chk_enabled(unsigned char op) | 107 | qla2x00_hba_err_chk_enabled(srb_t *sp) |
108 | { | 108 | { |
109 | switch (op) { | 109 | /* |
110 | * Uncomment when corresponding SCSI changes are done. | ||
111 | * | ||
112 | if (!sp->cmd->prot_chk) | ||
113 | return 0; | ||
114 | * | ||
115 | */ | ||
116 | |||
117 | switch (scsi_get_prot_op(sp->cmd)) { | ||
110 | case SCSI_PROT_READ_STRIP: | 118 | case SCSI_PROT_READ_STRIP: |
111 | case SCSI_PROT_WRITE_INSERT: | 119 | case SCSI_PROT_WRITE_INSERT: |
112 | if (ql2xenablehba_err_chk >= 1) | 120 | if (ql2xenablehba_err_chk >= 1) |