scsi: qla2xxx: Fix losing FCP-2 targets during port perturbation tests

commit 58d1c124cd upstream.

When a mix of FCP-2 (tape) and non-FCP-2 targets are present, FCP-2 target
state was incorrectly transitioned when both of the targets were gone. Fix
this by ignoring state transition for FCP-2 targets.

Link: https://lore.kernel.org/r/20220616053508.27186-7-njavali@marvell.com
Fixes: 44c57f2058 ("scsi: qla2xxx: Changes to support FCP2 Target")
Cc: stable@vger.kernel.org
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Arun Easi 2022-06-15 22:35:03 -07:00 committed by Greg Kroah-Hartman
parent 7bd568ea95
commit fd26efe500
1 changed files with 1 additions and 1 deletions

View File

@ -3629,7 +3629,7 @@ login_logout:
do_delete) {
if (fcport->loop_id != FC_NO_LOOP_ID) {
if (fcport->flags & FCF_FCP2_DEVICE)
fcport->logout_on_delete = 0;
continue;
ql_log(ql_log_warn, vha, 0x20f0,
"%s %d %8phC post del sess\n",