Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4826586ybl; Wed, 22 Jan 2020 05:28:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzRjxUiFBUoBx51clnXkYYPDr+fJGxlj3nYh6bh3I/sCUQM1No45bIOSAviMW5sefGJ9WAE X-Received: by 2002:a9d:6857:: with SMTP id c23mr7038230oto.351.1579699722944; Wed, 22 Jan 2020 05:28:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579699722; cv=none; d=google.com; s=arc-20160816; b=sq8r1+0W2Sr/vPB/aIL8WO3VDTeqPvyA+GqghDvKv/arLGDw6ZvWDKa8SRSJY0TgH9 JIlM7CWD6vl8hIkwoXKpI6WDoCtNeBXc/XO6fuN99hthWSHcxg0c+8mXroD9Kl1MwCdE v+sqClD1apeXASOF9r++PUOAtZkRGGOeQAo3yubg4YBORcobj4IFGrBLFRW8WT8BbONQ debkBr2lWc8BAiaxCG03hdgtAKR+3Uf3OLEK3nuqvdw2jKuRk9ibOfvhp0ZNT6xnUruh 5jCd4Ag57SoctRkfyOOSlagJi+eTkvpbuZ5St07J/tRob6UhnmjfPshb9AxXI0a0+6Uf dNUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yEjOtxrdPQanbNU5UAQDeKf3UQVqPsIHry3NtQI6b1E=; b=Y5AYQZyCivsuEbBEnweY1bTHmnPJoJh7LUJWeVHDhrPkQzF3bG39V9NpSDR9rY3Oz+ zmMlTmzcvijY2z/bF6BqoL2RtyWdVTDjla6u7YV7b/cA507MIxl3An6kSsP/HiYNIwLc tvIwMi1n8H6nSeJtAb12/aGz5i/2SuKuzfulDGmw7U/CTiALTnhTV3rI9vcNPl4+yWzg 7+nbj+p+jL7zL9FnxgRilCTwPKwnCU0sC/XoZt0+rj2abYldzGMK/RMiSOVdk2XEa16+ etxacAvtdUjCpRQiAIeWvCErzbE30EjKy2HTpX+QIHy6c8F6099/Ar5uSegekqHRQrFD /O3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eBNXQZVQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l132si21068571oib.192.2020.01.22.05.28.31; Wed, 22 Jan 2020 05:28:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eBNXQZVQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731505AbgAVN1i (ORCPT + 99 others); Wed, 22 Jan 2020 08:27:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:49100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729016AbgAVN1g (ORCPT ); Wed, 22 Jan 2020 08:27:36 -0500 Received: from localhost (unknown [84.241.205.26]) (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 E3371205F4; Wed, 22 Jan 2020 13:27:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579699655; bh=PJbRwng5GKSqDrlT0kUDX0BlEES6KWCf+PSeD1wahNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eBNXQZVQ7U/ws/twrK5le2Kg/KUV51Gspj/lmIQdlJXBfUmxPx+Y/Wy0FUHrv/6Gl Lh45stizbirYY0T3p8VjJyELCnTKWmWPG+B4G4KD2cW19ZhV+5NsnLIewirWAHIZcY ibdjKWium6tCGeltM7OHF26EffHuN/XF4ZiCB1pQ= 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 5.4 209/222] scsi: qla2xxx: fix rports not being mark as lost in sync fabric scan Date: Wed, 22 Jan 2020 10:29:55 +0100 Message-Id: <20200122092848.661376864@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200122092833.339495161@linuxfoundation.org> References: <20200122092833.339495161@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 @@ -5891,8 +5891,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) { @@ -5915,7 +5914,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);