Skip to content

Commit e9105c4

Browse files
mrangankarmartinkpetersen
authored andcommitted
scsi: qla2xxx: Remove unsupported ql2xenabledif option
User accidently passed module parameter ql2xenabledif=1 which is unsupported. However, driver still initialized which lead to guard tag errors during device discovery. Remove unsupported ql2xenabledif=1 option and validate the user input. Cc: stable@vger.kernel.org Signed-off-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Link: https://lore.kernel.org/r/20230821130045.34850-7-njavali@marvell.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 0ba0b01 commit e9105c4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/scsi/qla2xxx/qla_attr.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3093,8 +3093,6 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable)
30933093
vha->flags.difdix_supported = 1;
30943094
ql_dbg(ql_dbg_user, vha, 0x7082,
30953095
"Registered for DIF/DIX type 1 and 3 protection.\n");
3096-
if (ql2xenabledif == 1)
3097-
prot = SHOST_DIX_TYPE0_PROTECTION;
30983096
scsi_host_set_prot(vha->host,
30993097
prot | SHOST_DIF_TYPE1_PROTECTION
31003098
| SHOST_DIF_TYPE2_PROTECTION

drivers/scsi/qla2xxx/qla_dbg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* | Queue Command and IO tracing | 0x3074 | 0x300b |
1818
* | | | 0x3027-0x3028 |
1919
* | | | 0x303d-0x3041 |
20-
* | | | 0x302d,0x3033 |
20+
* | | | 0x302e,0x3033 |
2121
* | | | 0x3036,0x3038 |
2222
* | | | 0x303a |
2323
* | DPC Thread | 0x4023 | 0x4002,0x4013 |

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,6 +3289,13 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
32893289
host->max_id = ha->max_fibre_devices;
32903290
host->cmd_per_lun = 3;
32913291
host->unique_id = host->host_no;
3292+
3293+
if (ql2xenabledif && ql2xenabledif != 2) {
3294+
ql_log(ql_log_warn, base_vha, 0x302d,
3295+
"Invalid value for ql2xenabledif, resetting it to default (2)\n");
3296+
ql2xenabledif = 2;
3297+
}
3298+
32923299
if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif)
32933300
host->max_cmd_len = 32;
32943301
else
@@ -3525,8 +3532,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
35253532
base_vha->flags.difdix_supported = 1;
35263533
ql_dbg(ql_dbg_init, base_vha, 0x00f1,
35273534
"Registering for DIF/DIX type 1 and 3 protection.\n");
3528-
if (ql2xenabledif == 1)
3529-
prot = SHOST_DIX_TYPE0_PROTECTION;
35303535
if (ql2xprotmask)
35313536
scsi_host_set_prot(host, ql2xprotmask);
35323537
else

0 commit comments

Comments
 (0)