mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 04:36:22 +00:00
qla2x00t-32gbit: Query FW again before proceeding with login
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>
[ commit 42b2dab4340d upstream ]
This commit is contained in:
@@ -2462,8 +2462,23 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea)
|
||||
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);
|
||||
|
||||
@@ -1688,13 +1688,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);
|
||||
|
||||
Reference in New Issue
Block a user