Skip to contentSkip to conversation

qla2xxx: fix error status checking in qla24xx_modify_vp_config()

PATCH Superseded Dirk Müller 2 participants 2 messages Jan 5, 2022 – Jan 6, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qla2xxx: fix error status checking in qla24xx_modify_vp_config()

The function was checking vpmod->comp_status and reported it as error status, which is however already checked a few lines below.

Guessing from other occurrences it was supposed to check entry_status instead.

Fixes 2c3dfe3f6ad8 ("[SCSI] qla2xxx: add support for NPIV")
---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
index 10d2655ef676..e0dce38b65cf 100644
@@ -4253,7 +4253,7 @@ qla24xx_modify_vp_config(scsi_qla_host_t *vha)
 	if (rval != QLA_SUCCESS) {
 		ql_dbg(ql_dbg_mbx, vha, 0x10bd,
 		    "Failed to issue VP config IOCB (%x).\n", rval);
-	} else if (vpmod->comp_status != 0) {
+	} else if (vpmod->entry_status != 0) {
 		ql_dbg(ql_dbg_mbx, vha, 0x10be,
 		    "Failed to complete IOCB -- error status (%x).\n",
 		    vpmod->comp_status);
Signature · 1 line
2.34.1
#1 lore raw
Quoted 24 lines · Dirk Müller

The function was checking vpmod->comp_status and reported it as error status, which is however already checked a few lines below.

Guessing from other occurrences it was supposed to check entry_status instead.

Fixes 2c3dfe3f6ad8 ("[SCSI] qla2xxx: add support for NPIV")

---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
index 10d2655ef676..e0dce38b65cf 100644
@@ -4253,7 +4253,7 @@ qla24xx_modify_vp_config(scsi_qla_host_t *vha)
         if (rval != QLA_SUCCESS) {
                 ql_dbg(ql_dbg_mbx, vha, 0x10bd,
                     "Failed to issue VP config IOCB (%x).\n", rval);
-       } else if (vpmod->comp_status != 0) {
+       } else if (vpmod->entry_status != 0) {
                 ql_dbg(ql_dbg_mbx, vha, 0x10be,
Quoted 3 lines

                    "Failed to complete IOCB -- error status (%x).\n",
                    vpmod->comp_status);

Your suggestion makes sense, but you should also change the value passed to ql_dbg(), and cc the driver maintainers.

Thanks,
Martin