aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_inline.h
diff options
context:
space:
mode:
authorArun Easi <arun.easi@qlogic.com>2011-08-16 14:29:22 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 09:55:46 -0400
commit8cb2049c744809193ed3707a37c09676a24599ee (patch)
treeb9523a9a1be8f2610547036d849880d588f0a694 /drivers/scsi/qla2xxx/qla_inline.h
parent01350d05539d1c95ef3568d062d864ab76ae7670 (diff)
[SCSI] qla2xxx: T10 DIF - Handle uninitalized sectors.
Driver needs to update protection bytes for uninitialized sectors as they are not DMA-d. Signed-off-by: Arun Easi <arun.easi@qlogic.com> Reviewed-by: Andrew Vasquez <andrew.vasquez@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.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index d2e904bc21c0..c06e5f9b431e 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -102,3 +102,24 @@ qla2x00_set_fcport_state(fc_port_t *fcport, int state)
102 fcport->d_id.b.al_pa); 102 fcport->d_id.b.al_pa);
103 } 103 }
104} 104}
105
106static inline int
107qla2x00_hba_err_chk_enabled(unsigned char op)
108{
109 switch (op) {
110 case SCSI_PROT_READ_STRIP:
111 case SCSI_PROT_WRITE_INSERT:
112 if (ql2xenablehba_err_chk >= 1)
113 return 1;
114 break;
115 case SCSI_PROT_READ_PASS:
116 case SCSI_PROT_WRITE_PASS:
117 if (ql2xenablehba_err_chk >= 2)
118 return 1;
119 break;
120 case SCSI_PROT_READ_INSERT:
121 case SCSI_PROT_WRITE_STRIP:
122 return 1;
123 }
124 return 0;
125}