diff mbox series

[5/7] qla2xxx: Fix NVME and NPIV connect issue

Message ID 20241115130313.46826-6-njavali@marvell.com (mailing list archive)
State New
Headers show
Series qla2xxx misc. bug fixes | expand

Commit Message

Nilesh Javali Nov. 15, 2024, 1:03 p.m. UTC
From: Quinn Tran <qutran@marvell.com>

NVME controller fails to send connect command due to failure to locate
hw context buffer for NVME queue 0 (blk_mq_hw_ctx, hctx_idx=0). The cause
of the issue is NPIV host did not initialize the vha->irq_offset field.
This field is given to blk-mq (blk_mq_pci_map_queues) to help locate
the beginning of IO Queues which in turn help locate NVME queue 0.

Initialize this field to allow NVME to work properly with NPIV host.

 kernel: nvme nvme5: Connect command failed, errno: -18
 kernel: nvme nvme5: qid 0: secure concatenation is not supported
 kernel: nvme nvme5: NVME-FC{5}: create_assoc failed, assoc_id 2e9100 ret 401
 kernel: nvme nvme5: NVME-FC{5}: reset: Reconnect attempt failed (401)
 kernel: nvme nvme5: NVME-FC{5}: Reconnect attempt in 2 seconds

Cc: stable@vger.kernel.org
Fixes: f0783d43dde4 ("scsi: qla2xxx: Use correct number of vectors for online CPUs")
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_mid.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index 76703f2706b8..79879c4743e6 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -506,6 +506,7 @@  qla24xx_create_vhost(struct fc_vport *fc_vport)
 		return(NULL);
 	}
 
+	vha->irq_offset = QLA_BASE_VECTORS;
 	host = vha->host;
 	fc_vport->dd_data = vha;
 	/* New host info */