mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wentao Liang <vulab@iscas.ac.cn>
To: njavali@marvell.com, James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com
Cc: mrangankar@marvell.com, GR-QLogic-Storage-Upstream@marvell.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Wentao Liang <vulab@iscas.ac.cn>
Subject: [PATCH] scsi: qla4xxx: Add missing is_qla4022 check in device initialization
Date: Tue, 11 Feb 2025 21:38:44 +0800	[thread overview]
Message-ID: <20250211133844.855-1-vulab@iscas.ac.cn> (raw)

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@iscas.ac.cn>
---
 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


             reply	other threads:[~2025-02-11 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-11 13:38 Wentao Liang [this message]
2025-02-12 14:24 ` Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250211133844.855-1-vulab@iscas.ac.cn \
    --to=vulab@iscas.ac.cn \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mrangankar@marvell.com \
    --cc=njavali@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®