Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a51c838 authored by Himanshu Madhani's avatar Himanshu Madhani Committed by Greg Kroah-Hartman
Browse files

scsi: qla2xxx: Fix update_fcport for current_topology

[ Upstream commit 89eb2e7e794da2691e5aca02ed102bb287e3575a ]

logout_on_delete flag should not be set if the topology is Loop. This patch
fixes unintentional logout during loop topology.

Link: https://lore.kernel.org/r/20191217220617.28084-6-hmadhani@marvell.com


Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 6dfe4344c168 ("scsi: qla2xxx: Fix deletion race condition")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ecdf4c65
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5485,6 +5485,9 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
	fcport->login_retry = vha->hw->login_retry_count;
	fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT);
	fcport->deleted = 0;
	if (vha->hw->current_topology == ISP_CFG_NL)
		fcport->logout_on_delete = 0;
	else
		fcport->logout_on_delete = 1;
	fcport->n2n_chip_reset = fcport->n2n_link_reset_cnt = 0;