Thread (30 messages) 30 messages, 2 authors, 2021-08-05
STALE1789d
Revisions (11)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v1 [diff vs current]
  4. v2 [diff vs current]
  5. v1 current
  6. v2 [diff vs current]
  7. v1 [diff vs current]
  8. v1 [diff vs current]
  9. v2 [diff vs current]
  10. v1 [diff vs current]
  11. v2 [diff vs current]

[PATCH 09/14] qla2xxx: fix npiv create erroneous error

From: Nilesh Javali <njavali@marvell.com>
Date: 2021-08-05 10:24:11
Subsystem: qlogic qla2xxx fc-scsi driver, scsi subsystem, the rest · Maintainers: Nilesh Javali, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

From: Quinn Tran <redacted>

When user create multiple NPIVs, the switch capabilities field
is checked before a vport is allowed to create. This field is being
toggled if a switch scan is in progress. This creates erroneous
reject of vport create.

Signed-off-by: Quinn Tran <redacted>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index c427ef7e7c72..266e9e06a6f2 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -4623,11 +4623,11 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
 	/* initialize */
 	ha->min_external_loopid = SNS_FIRST_LOOP_ID;
 	ha->operating_mode = LOOP;
-	ha->switch_cap = 0;
 
 	switch (topo) {
 	case 0:
 		ql_dbg(ql_dbg_disc, vha, 0x200b, "HBA in NL topology.\n");
+		ha->switch_cap = 0;
 		ha->current_topology = ISP_CFG_NL;
 		strcpy(connect_type, "(Loop)");
 		break;
@@ -4641,6 +4641,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
 
 	case 2:
 		ql_dbg(ql_dbg_disc, vha, 0x200d, "HBA in N P2P topology.\n");
+		ha->switch_cap = 0;
 		ha->operating_mode = P2P;
 		ha->current_topology = ISP_CFG_N;
 		strcpy(connect_type, "(N_Port-to-N_Port)");
@@ -4657,6 +4658,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
 	default:
 		ql_dbg(ql_dbg_disc, vha, 0x200f,
 		    "HBA in unknown topology %x, using NL.\n", topo);
+		ha->switch_cap = 0;
 		ha->current_topology = ISP_CFG_NL;
 		strcpy(connect_type, "(Loop)");
 		break;
-- 
2.19.0.rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help