From patchwork Wed Jan 22 09:29:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233559 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F889C33CB6 for ; Wed, 22 Jan 2020 09:44:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EAF682468E for ; Wed, 22 Jan 2020 09:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579686256; bh=kaVVNOUg6hZOJU0tZTqrhmIx6Qi5G8d0rrMaaWLoxmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=yCVuo8qnBiMno1gbHIIRs9GyoxLFo6Ul08FElpJMDvBFI7E6SKwQxpvxFwOGxdEVP Co1rVGtwkx27AKvq3/v+LbK6orBYvSIE/PxCbdaUW/CTepK25W4y3dS/Ei4KsPT6ff fM0lQpRHGHLU6jPY3o3ybnC4NShZHxFkfDroJoI4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387806AbgAVJoP (ORCPT ); Wed, 22 Jan 2020 04:44:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:37166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388006AbgAVJoL (ORCPT ); Wed, 22 Jan 2020 04:44:11 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A80ED24689; Wed, 22 Jan 2020 09:44:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579686251; bh=kaVVNOUg6hZOJU0tZTqrhmIx6Qi5G8d0rrMaaWLoxmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a4kE6GIDzA0YWCdOIMsjtdT4VyUtQEhPBI/uKPueBhakIwoIiqtVC6069RExfwEdf E6SvU0AwYifA4nyLxSMnd9zDbxSMWhZQT3n1FTmD1F9fDSbDcAmYhhMii/iiaX67nr Yf0VXoJzvBaU+V9apz8CWTI/auqEA+voVsERuZLs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Bond , Martin Wilck , Himanshu Madhani , "Martin K. Petersen" Subject: [PATCH 4.19 098/103] scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan Date: Wed, 22 Jan 2020 10:29:54 +0100 Message-Id: <20200122092816.476882804@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092803.587683021@linuxfoundation.org> References: <20200122092803.587683021@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Martin Wilck commit d341e9a8f2cffe4000c610225c629f62c7489c74 upstream. In qla2x00_find_all_fabric_devs(), fcport->flags & FCF_LOGIN_NEEDED is a necessary condition for logging into new rports, but not for dropping lost ones. Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Link: https://lore.kernel.org/r/20191122221912.20100-2-martin.wilck@suse.com Tested-by: David Bond Signed-off-by: Martin Wilck Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -5710,8 +5710,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_ho if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) break; - if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 || - (fcport->flags & FCF_LOGIN_NEEDED) == 0) + if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) continue; if (fcport->scan_state == QLA_FCPORT_SCAN) { @@ -5734,7 +5733,8 @@ qla2x00_find_all_fabric_devs(scsi_qla_ho } } - if (fcport->scan_state == QLA_FCPORT_FOUND) + if (fcport->scan_state == QLA_FCPORT_FOUND && + (fcport->flags & FCF_LOGIN_NEEDED) != 0) qla24xx_fcport_handle_login(vha, fcport); } return (rval);