Skip to contentSkip to conversation

scsi: qla4xxx: Add missing is_qla4022 check in device initialization

PATCH Superseded Wentao Liang 2 participants 2 messages Feb 11, 2025 – Feb 12, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: qla4xxx: Add missing is_qla4022 check in device initialization

The current code only checks for is_qla4032 in the adapter initialization logic, but is_qla4022 is also required for proper handling of qla4022 devices. This can lead to incorrect behavior on qla4022 adapters.

This patch adds the missing is_qla4022 check to ensure proper handling of both qla4022 and qla4032 devices during adapter initialization.

Fixes d915058f4874 ("[SCSI] qla4xxx: add support for qla4032")
---
 drivers/scsi/qla4xxx/ql4_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla4xxx/ql4_init.c +1 -1
index 301bc09c8365..dfe3d0b26224 100644
@@ -513,7 +513,7 @@ static int qla4xxx_fw_ready(struct scsi_qla_host *ha)
 			      "seconds expired= %d\n", ha->host_no, __func__,
 			      ha->firmware_state, ha->addl_fw_state,
 			      timeout_count));
-		if (is_qla4032(ha) &&
+		if ((is_qla4022(ha) || is_qla4032(ha)) &&
 			!(ha->addl_fw_state & FW_ADDSTATE_LINK_UP) &&
 			(timeout_count < ADAPTER_INIT_TOV - 5)) {
 			break;
Signature · 1 line
2.42.0.windows.2