From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev,
Anil Gurumurthy <agurumurthy@marvell.com>,
Nilesh Javali <njavali@marvell.com>,
Himanshu Madhani <hmadhani2024@gmail.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH 6.18 42/49] scsi: qla2xxx: Query FW again before proceeding with login
Date: Fri, 13 Feb 2026 14:48:26 +0100 [thread overview]
Message-ID: <20260213134710.406555836@linuxfoundation.org> (raw)
In-Reply-To: <20260213134708.885500854@linuxfoundation.org>
6.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anil Gurumurthy <agurumurthy@marvell.com>
commit 42b2dab4340d39b71334151e10c6d7d9b0040ffa upstream.
Issue occurred during a continuous reboot test of several thousand
iterations specific to a fabric topo with dual mode target where it
sends a PLOGI/PRLI and then sends a LOGO. The initiator was also in the
process of discovery and sent a PLOGI to the switch. It then queried a
list of ports logged in via mbx 75h and the GPDB response indicated that
the target was logged in. This caused a mismatch in the states between
the driver and FW. Requery the FW for the state and proceed with the
rest of discovery process.
Fixes: a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery")
Cc: stable@vger.kernel.org
Signed-off-by: Anil Gurumurthy <agurumurthy@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani2024@gmail.com>
Link: https://patch.msgid.link/20251210101604.431868-11-njavali@marvell.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_init.c | 19 +++++++++++++++++--
drivers/scsi/qla2xxx/qla_isr.c | 19 +++++++++++++++++--
2 files changed, 34 insertions(+), 4 deletions(-)
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2462,8 +2462,23 @@ qla24xx_handle_plogi_done_event(struct s
ea->sp->gen1, fcport->rscn_gen,
ea->data[0], ea->data[1], ea->iop[0], ea->iop[1]);
- if ((fcport->fw_login_state == DSC_LS_PLOGI_PEND) ||
- (fcport->fw_login_state == DSC_LS_PRLI_PEND)) {
+ if (fcport->fw_login_state == DSC_LS_PLOGI_PEND) {
+ ql_dbg(ql_dbg_disc, vha, 0x20ea,
+ "%s %d %8phC Remote is trying to login\n",
+ __func__, __LINE__, fcport->port_name);
+ /*
+ * If we get here, there is port thats already logged in,
+ * but it's state has not moved ahead. Recheck with FW on
+ * what state it is in and proceed ahead
+ */
+ if (!N2N_TOPO(vha->hw)) {
+ fcport->fw_login_state = DSC_LS_PRLI_COMP;
+ qla24xx_post_gpdb_work(vha, fcport, 0);
+ }
+ return;
+ }
+
+ if (fcport->fw_login_state == DSC_LS_PRLI_PEND) {
ql_dbg(ql_dbg_disc, vha, 0x20ea,
"%s %d %8phC Remote is trying to login\n",
__func__, __LINE__, fcport->port_name);
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1676,13 +1676,28 @@ skip_rio:
/* Port logout */
fcport = qla2x00_find_fcport_by_loopid(vha, mb[1]);
- if (!fcport)
+ if (!fcport) {
+ ql_dbg(ql_dbg_async, vha, 0x5011,
+ "Could not find fcport:%04x %04x %04x\n",
+ mb[1], mb[2], mb[3]);
break;
- if (atomic_read(&fcport->state) != FCS_ONLINE)
+ }
+
+ if (atomic_read(&fcport->state) != FCS_ONLINE) {
+ ql_dbg(ql_dbg_async, vha, 0x5012,
+ "Port state is not online State:0x%x \n",
+ atomic_read(&fcport->state));
+ ql_dbg(ql_dbg_async, vha, 0x5012,
+ "Scheduling session for deletion \n");
+ fcport->logout_on_delete = 0;
+ qlt_schedule_sess_for_deletion(fcport);
break;
+ }
+
ql_dbg(ql_dbg_async, vha, 0x508a,
"Marking port lost loopid=%04x portid=%06x.\n",
fcport->loop_id, fcport->d_id.b24);
+
if (qla_ini_mode_enabled(vha)) {
fcport->logout_on_delete = 0;
qlt_schedule_sess_for_deletion(fcport);
next prev parent reply other threads:[~2026-02-13 13:54 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-13 13:47 [PATCH 6.18 00/49] 6.18.11-rc1 review Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 01/49] io_uring/io-wq: add exit-on-idle state Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 02/49] io_uring: allow io-wq workers to exit when unused Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 03/49] smb: client: split cached_fid bitfields to avoid shared-byte RMW races Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 04/49] ksmbd: fix infinite loop caused by next_smb2_rcv_hdr_off reset in error paths Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 05/49] ksmbd: add chann_lock to protect ksmbd_chann_list xarray Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 06/49] smb: server: fix leak of active_num_conn in ksmbd_tcp_new_connection() Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 07/49] smb: smbdirect: introduce smbdirect_socket.recv_io.credits.available Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 08/49] smb: smbdirect: introduce smbdirect_socket.send_io.bcredits.* Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 09/49] smb: server: make use of smbdirect_socket.recv_io.credits.available Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 10/49] smb: server: let recv_done() queue a refill when the peer is low on credits Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 11/49] smb: server: make use of smbdirect_socket.send_io.bcredits Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 12/49] smb: server: fix last send credit problem causing disconnects Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 13/49] smb: server: let send_done handle a completion without IB_SEND_SIGNALED Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 14/49] smb: client: make use of smbdirect_socket.recv_io.credits.available Greg Kroah-Hartman
2026-02-13 13:47 ` [PATCH 6.18 15/49] smb: client: let recv_done() queue a refill when the peer is low on credits Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 16/49] smb: client: let smbd_post_send() make use of request->wr Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 17/49] smb: client: remove pointless sc->recv_io.credits.count rollback Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 18/49] smb: client: remove pointless sc->send_io.pending handling in smbd_post_send_iter() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 19/49] smb: client: port and use the wait_for_credits logic used by server Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 20/49] smb: client: split out smbd_ib_post_send() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 21/49] smb: client: introduce and use smbd_{alloc, free}_send_io() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 22/49] smb: client: use smbdirect_send_batch processing Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 23/49] smb: client: make use of smbdirect_socket.send_io.bcredits Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 24/49] smb: client: fix last send credit problem causing disconnects Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 25/49] smb: client: let smbd_post_send_negotiate_req() use smbd_post_send() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 26/49] smb: client: let send_done handle a completion without IB_SEND_SIGNALED Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 27/49] driver core: enforce device_lock for driver_match_device() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 28/49] Bluetooth: btusb: Add USB ID 7392:e611 for Edimax EW-7611UXB Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 29/49] ALSA: hda/conexant: Add quirk for HP ZBook Studio G4 Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 30/49] crypto: iaa - Fix out-of-bounds index in find_empty_iaa_compression_mode Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 31/49] crypto: octeontx - Fix length check to avoid truncation in ucode_load_store Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 32/49] crypto: omap - Allocate OMAP_CRYPTO_FORCE_COPY scatterlists correctly Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 33/49] crypto: virtio - Add spinlock protection with virtqueue notification Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 34/49] crypto: virtio - Remove duplicated virtqueue_kick in virtio_crypto_skcipher_crypt_req Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 35/49] nilfs2: Fix potential block overflow that cause system hang Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 36/49] hfs: ensure sb->s_fs_info is always cleaned up Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 37/49] wifi: rtw88: Fix alignment fault in rtw_core_enable_beacon() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 38/49] scsi: qla2xxx: Validate sp before freeing associated memory Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 39/49] scsi: qla2xxx: Allow recovery for tape devices Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 40/49] scsi: qla2xxx: Delay module unload while fabric scan in progress Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 41/49] scsi: qla2xxx: Free sp in error path to fix system crash Greg Kroah-Hartman
2026-02-13 13:48 ` Greg Kroah-Hartman [this message]
2026-02-13 13:48 ` [PATCH 6.18 43/49] bus: fsl-mc: fix use-after-free in driver_override_show() Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 44/49] erofs: fix UAF issue for file-backed mounts w/ directio option Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 45/49] xfs: fix UAF in xchk_btree_check_block_owner Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 46/49] drm/exynos: vidi: use ctx->lock to protect struct vidi_context member variables related to memory alloc/free Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 47/49] PCI: endpoint: Avoid creating sub-groups asynchronously Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 48/49] wifi: rtl8xxxu: fix slab-out-of-bounds in rtl8xxxu_sta_add Greg Kroah-Hartman
2026-02-13 13:48 ` [PATCH 6.18 49/49] gpio: omap: do not register driver in probe() Greg Kroah-Hartman
2026-02-13 17:11 ` [PATCH 6.18 00/49] 6.18.11-rc1 review Peter Schneider
2026-02-13 17:37 ` Justin Forbes
2026-02-13 18:26 ` Ronald Warsow
2026-02-13 19:21 ` Jon Hunter
2026-02-13 19:30 ` Florian Fainelli
2026-02-14 0:57 ` Brett Mastbergen
2026-02-14 5:48 ` Luna Jernberg
2026-02-14 10:35 ` Ron Economos
2026-02-14 16:02 ` Brett A C Sheffield
2026-02-14 23:53 ` Barry K. Nathan
2026-02-15 0:14 ` Miguel Ojeda
2026-02-15 9:52 ` Dileep malepu
2026-02-16 14:30 ` Mark Brown
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=20260213134710.406555836@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=agurumurthy@marvell.com \
--cc=hmadhani2024@gmail.com \
--cc=martin.petersen@oracle.com \
--cc=njavali@marvell.com \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
/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