Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2282571ybl; Thu, 19 Dec 2019 10:58:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyJ632s54qGQ12i2MsLH8AXxSsKiPGKQHIOOsBG6dT3AMVdQLEQSPUOZyZjleEN69CLQHml X-Received: by 2002:a05:6830:4c2:: with SMTP id s2mr10665205otd.144.1576781936831; Thu, 19 Dec 2019 10:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781936; cv=none; d=google.com; s=arc-20160816; b=zuMWt+LKlBd8I10yBIhzi81MksGOVMqW7FLIXyQ0lYInR5EvSLquSXjCToLFcEeI8n cYTjlERw7dL3VZly889tAtIQbpgs6PxqNJASM3/HZeiqQncNuXwPi/SJhVLUwdp5hwTe SZz7sodsQxHYMlXFGFXT1+x1Z8EABuqYGo9zmOtR7cF7ORRycLQHqbHqv5PjyMVMpLED E8te2S5mVGSw3a0O6plnTSFGf3uUtv3P0EVZ44rRoPR936+bt9eCGe5ArcnBBYyUjMyL YpPUf0KZ82mO7+qj48CjxIY+xkqSka3NpMkQAPj+k1IZ8rZrIzp1EePz9vRUKJUgKcAm YUZQ== 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=6R0V+FpFIYCQdXfuvGmihxlAkgZR1PpB4E9Xlc02JQU=; b=SG2JjLxD0Nm6mmsVOk+xMBRG6ygwGZDCjPxJXrbS5k0ADLf1MfjiozD0e6nddLqPFr V2uuwMzA8DYmJD4HNczzn/qBY1IVzFkCP4hVSiVurVtOUVY6eUo4VrD9mZ4x4Qt+Dp6q cw6hkpzBWkfsNdd3bjWPE344eNdXJ5E0Xy8R39jaY0QDJzRGjwc2syVfnKGMubpm5S2Z hTrFEK1FjlBdxmO1q13ZbxakX1wD6i9EmI0Yj62DndnTeGiKLfNW6gSkitwUW4MTTW+z /uTn/Cwg8MoIRC/wJO72uxdUeghl1o0HzlRirTncVOLMGx0e1Ur/P/aJBF2DANm8g6gR L8Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mo1uVWO5; 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 3si3378382oir.132.2019.12.19.10.58.45; Thu, 19 Dec 2019 10:58:56 -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=Mo1uVWO5; 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 S1730732AbfLSSzu (ORCPT + 99 others); Thu, 19 Dec 2019 13:55:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:52000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729789AbfLSSzs (ORCPT ); Thu, 19 Dec 2019 13:55:48 -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 5F1DB24676; Thu, 19 Dec 2019 18:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781747; bh=A6O7U4jUTSn2sMgO5pJsU6Gzns8Nq5coPBqaHcHZKoo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mo1uVWO5mON+WKT40lDm+m1/aSg9Ne7ooOkHzaCwder+n03t/XrgLcQKqStSWR6PE aaACRC2v84evgCw+TJ6pjgtiE/P3wL8coH0SPsi5dVgPgW04k/GjNGmEezLttBrlyq 374msNux1QLw2U3I3NZfdwHXLTynl4ksdHTfqlRQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quinn Tran , Himanshu Madhani , Hannes Reinecke , Roman Bolshakov , "Martin K. Petersen" Subject: [PATCH 5.4 63/80] scsi: qla2xxx: Change discovery state before PLOGI Date: Thu, 19 Dec 2019 19:34:55 +0100 Message-Id: <20191219183136.597686812@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183031.278083125@linuxfoundation.org> References: <20191219183031.278083125@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: Roman Bolshakov commit 58e39a2ce4be08162c0368030cdc405f7fd849aa upstream. When a port sends PLOGI, discovery state should be changed to login pending, otherwise RELOGIN_NEEDED bit is set in qla24xx_handle_plogi_done_event(). RELOGIN_NEEDED triggers another PLOGI, and it never goes out of the loop until login timer expires. Fixes: 8777e4314d397 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Fixes: 8b5292bcfcacf ("scsi: qla2xxx: Fix Relogin to prevent modifying scan_state flag") Cc: Quinn Tran Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191125165702.1013-6-r.bolshakov@yadro.com Acked-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Tested-by: Hannes Reinecke Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_init.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -534,6 +534,7 @@ static int qla_post_els_plogi_work(struc e->u.fcport.fcport = fcport; fcport->flags |= FCF_ASYNC_ACTIVE; + fcport->disc_state = DSC_LOGIN_PEND; return qla2x00_post_work(vha, e); }