mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 09:41:03 +02:00
scsi: qla2xxx: Fix Name Server logout detection on FWI2 adapters
In the CS_PORT_LOGGED_OUT case of qla2x00_chk_ms_status(), the
FWI2-capable branch compared ms_pkt->loop_id.extended against NPH_SNS to
decide whether the Name Server had logged out. On FWI2 and later
adapters the response is a ct_entry_24xx / ct_entry_24xx_ext, where
loop_id.extended (via the legacy ms_iocb_entry_t view) aliases offset 8,
which is comp_status, not nport_handle (offset 10). As this code runs
under CS_PORT_LOGGED_OUT, the field read back 0x29 (CS_PORT_LOGGED_OUT)
and the comparison against NPH_SNS (0x7fc) was always false.
As a result the driver never recognized a Name Server logout on FWI2/
29xx adapters: it returned the generic QLA_FUNCTION_FAILED instead of
QLA_NOT_LOGGED_IN and skipped setting LOOP_RESYNC_NEEDED /
LOCAL_LOOP_UPDATE, so the fabric rediscovery triggered by an SNS logout
did not happen.
Read nport_handle from the ct_entry_24xx layout (offset 10) instead.
nport_handle is at the same offset in ct_entry_24xx and
ct_entry_24xx_ext, so a single cast covers 24xx-class and 29xx. The
non-FWI2 branch keeps using loop_id.extended, which is correct for the
ms_iocb_entry_t response on those adapters.
Fixes: b98ae0d748 ("scsi: qla2xxx: Fix name server relogin")
Cc: stable@vger.kernel.org
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260723050413.3897522-48-njavali@marvell.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
c20ee380ca
commit
eb137255fd
|
|
@ -192,8 +192,8 @@ qla2x00_chk_ms_status(scsi_qla_host_t *vha, ms_iocb_entry_t *ms_pkt,
|
|||
break;
|
||||
case CS_PORT_LOGGED_OUT:
|
||||
if (IS_FWI2_CAPABLE(ha)) {
|
||||
if (le16_to_cpu(ms_pkt->loop_id.extended) ==
|
||||
NPH_SNS)
|
||||
if (le16_to_cpu(((struct ct_entry_24xx *)
|
||||
ms_pkt)->nport_handle) == NPH_SNS)
|
||||
lid_is_sns = true;
|
||||
} else {
|
||||
if (le16_to_cpu(ms_pkt->loop_id.extended) ==
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user