Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3272595rwb; Mon, 15 Aug 2022 22:55:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR6hHu6UiihzSnhdl2e6ijfVAj0uzMHwC/1fKhIP9eN0gC+97sWfYTZ3GvtSf+RKPq7Zl/xT X-Received: by 2002:a17:907:1c87:b0:6f0:29ea:cc01 with SMTP id nb7-20020a1709071c8700b006f029eacc01mr12472704ejc.671.1660629358738; Mon, 15 Aug 2022 22:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660629358; cv=none; d=google.com; s=arc-20160816; b=mWFN1qOZHyfoUICIbtX5icO8hJZlGSF0FbiBuw8mYH+HbDehZK1Rkf1c03pwKQo4h+ c/2Dgu9zGY3HXrORXOHEHSNDYWyRVw7zM1bPRT3VkoF9E5z6OXY9Ow4JBbTEzt5eiIag nEG+7amPSPg7p7OVF98mxIZ+3vqLD7sukIg5QUkoeO1zWs3EUxP8yKudzHJRAa14YtYS nxx+qZlW1f1lAWS0TxF96iksOJrv7QWUXgwLmqG2J79isDDvsT3cw3meKMqas+8dH8Tr tzN5VjLWaB9tNDibCGyyJQQPq/ENDBdns0RIiprjD7Pf3SJ51zm784G0auuRrGli5lMy rtzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a46j3Ehg8IJZY1uKle0E2SGwJKkd6K8oEHt6Gx9uAOA=; b=EHhz/Biy+Y+l3g/lQg1+ScL3SVTuJtX1fhX8HLYAi+33AtJe8l3zSU0aQElkkxc/sd Wrmw7zZ5cuxQJSNJmyLu5ZVcVForVdSTTUpw9VFANOb+l8L8zSTAp93dy135mX40It14 8jof8MFGguD29Em6FxTJL2r3chne8UJ0xqzBrkQBn9Ol2ASgwxZb16uDyYYi5wX3HcGS MZAuz3jnMGVXpkmCIVTAQzoQ0Y06ioFG1R8JKWMaFdsURvjF9mvmvUR0g5E5bRaxMF0e Rso0PeLkUEjSBwfw1kuBw+KIdaNX1Wu6RmqhFqP4290j+HTztIj6PTTcScnrdjSXq0EE 2wPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CVKsyEiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs16-20020a170906dc9000b00738466b6883si4609337ejc.42.2022.08.15.22.55.33; Mon, 15 Aug 2022 22:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CVKsyEiS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230133AbiHPEeY (ORCPT + 99 others); Tue, 16 Aug 2022 00:34:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229727AbiHPEdk (ORCPT ); Tue, 16 Aug 2022 00:33:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4723816C125; Mon, 15 Aug 2022 13:24:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D7A9661072; Mon, 15 Aug 2022 20:24:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1C10C433D6; Mon, 15 Aug 2022 20:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595096; bh=hTRS1tqejUoIqcG1ti54Lman6PjQTp4st0trKhr/PfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CVKsyEiSs+LwUzdOK4ATULpUgjDgO2T5mqWoZCmQo/Rth2NAIPoiSa1vwH5rTMKld esYuuBYVd8qh7ijia88aN5JSLhXuu+dTYnXt16vo35FAJjqvIu0LxHSNZxkJnmA1Em THUbk0q8l+1JHN5GkaXXSw0LwtvPORof5D5deAUA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Quinn Tran , Nilesh Javali , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.19 0623/1157] scsi: qla2xxx: edif: Fix no logout on delete for N2N Date: Mon, 15 Aug 2022 19:59:39 +0200 Message-Id: <20220815180504.575422157@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quinn Tran [ Upstream commit ec538eb838f334453b10e7e9b260f0c358018a37 ] The driver failed to send implicit logout on session delete. For edif, this failed to flush any lingering SA index in FW. Set a flag to turn on implicit logout early in the session recovery to make sure the logout will go out in case of error. Link: https://lore.kernel.org/r/20220608115849.16693-8-njavali@marvell.com Fixes: 4de067e5df12 ("scsi: qla2xxx: edif: Add N2N support for EDIF") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/qla_iocb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 46c879923da1..42ce4e1fe744 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2882,6 +2882,9 @@ static void qla2x00_els_dcmd2_sp_done(srb_t *sp, int res) sp->name, res, sp->handle, fcport->d_id.b24, fcport->port_name); fcport->flags &= ~(FCF_ASYNC_SENT|FCF_ASYNC_ACTIVE); + /* For edif, set logout on delete to ensure any residual key from FW is flushed.*/ + fcport->logout_on_delete = 1; + fcport->chip_reset = vha->hw->base_qpair->chip_reset; if (sp->flags & SRB_WAKEUP_ON_COMP) complete(&lio->u.els_plogi.comp); -- 2.35.1