[PATCH] scsi: qla4xxx: Add missing is_qla4022 check in device initialization
From: Wentao Liang
Date: Tue Feb 11 2025 - 08:39:23 EST
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")
Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
---
drivers/scsi/qla4xxx/ql4_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 301bc09c8365..dfe3d0b26224 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -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;
--
2.42.0.windows.2