diff options
author | Arun Easi <arun.easi@qlogic.com> | 2011-08-16 14:29:22 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 09:55:46 -0400 |
commit | 8cb2049c744809193ed3707a37c09676a24599ee (patch) | |
tree | b9523a9a1be8f2610547036d849880d588f0a694 /drivers/scsi/qla2xxx/qla_os.c | |
parent | 01350d05539d1c95ef3568d062d864ab76ae7670 (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_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index e02df276804e..d65a3005b439 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -106,17 +106,21 @@ MODULE_PARM_DESC(ql2xmaxqdepth, | |||
106 | "Maximum queue depth to report for target devices."); | 106 | "Maximum queue depth to report for target devices."); |
107 | 107 | ||
108 | /* Do not change the value of this after module load */ | 108 | /* Do not change the value of this after module load */ |
109 | int ql2xenabledif = 1; | 109 | int ql2xenabledif = 0; |
110 | module_param(ql2xenabledif, int, S_IRUGO|S_IWUSR); | 110 | module_param(ql2xenabledif, int, S_IRUGO|S_IWUSR); |
111 | MODULE_PARM_DESC(ql2xenabledif, | 111 | MODULE_PARM_DESC(ql2xenabledif, |
112 | " Enable T10-CRC-DIF " | 112 | " Enable T10-CRC-DIF " |
113 | " Default is 0 - No DIF Support. 1 - Enable it"); | 113 | " Default is 0 - No DIF Support. 1 - Enable it" |
114 | ", 2 - Enable DIF for all types, except Type 0."); | ||
114 | 115 | ||
115 | int ql2xenablehba_err_chk; | 116 | int ql2xenablehba_err_chk = 2; |
116 | module_param(ql2xenablehba_err_chk, int, S_IRUGO|S_IWUSR); | 117 | module_param(ql2xenablehba_err_chk, int, S_IRUGO|S_IWUSR); |
117 | MODULE_PARM_DESC(ql2xenablehba_err_chk, | 118 | MODULE_PARM_DESC(ql2xenablehba_err_chk, |
118 | " Enable T10-CRC-DIF Error isolation by HBA" | 119 | " Enable T10-CRC-DIF Error isolation by HBA:\n" |
119 | " Default is 0 - Error isolation disabled, 1 - Enable it"); | 120 | " Default is 1.\n" |
121 | " 0 -- Error isolation disabled\n" | ||
122 | " 1 -- Error isolation enabled only for DIX Type 0\n" | ||
123 | " 2 -- Error isolation enabled for all Types\n"); | ||
120 | 124 | ||
121 | int ql2xiidmaenable=1; | 125 | int ql2xiidmaenable=1; |
122 | module_param(ql2xiidmaenable, int, S_IRUGO); | 126 | module_param(ql2xiidmaenable, int, S_IRUGO); |
@@ -2380,11 +2384,14 @@ skip_dpc: | |||
2380 | 2384 | ||
2381 | if ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && ql2xenabledif) { | 2385 | if ((IS_QLA25XX(ha) || IS_QLA81XX(ha)) && ql2xenabledif) { |
2382 | if (ha->fw_attributes & BIT_4) { | 2386 | if (ha->fw_attributes & BIT_4) { |
2387 | int prot = 0; | ||
2383 | base_vha->flags.difdix_supported = 1; | 2388 | base_vha->flags.difdix_supported = 1; |
2384 | ql_dbg(ql_dbg_init, base_vha, 0x00f1, | 2389 | ql_dbg(ql_dbg_init, base_vha, 0x00f1, |
2385 | "Registering for DIF/DIX type 1 and 3 protection.\n"); | 2390 | "Registering for DIF/DIX type 1 and 3 protection.\n"); |
2391 | if (ql2xenabledif == 1) | ||
2392 | prot = SHOST_DIX_TYPE0_PROTECTION; | ||
2386 | scsi_host_set_prot(host, | 2393 | scsi_host_set_prot(host, |
2387 | SHOST_DIF_TYPE1_PROTECTION | 2394 | prot | SHOST_DIF_TYPE1_PROTECTION |
2388 | | SHOST_DIF_TYPE2_PROTECTION | 2395 | | SHOST_DIF_TYPE2_PROTECTION |
2389 | | SHOST_DIF_TYPE3_PROTECTION | 2396 | | SHOST_DIF_TYPE3_PROTECTION |
2390 | | SHOST_DIX_TYPE1_PROTECTION | 2397 | | SHOST_DIX_TYPE1_PROTECTION |