Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883655rwb; Mon, 15 Aug 2022 13:15:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5mjf45vq41i8oATec0Pf2B8B9FLj88/dWJRHbmA3eLhvVOhMT5+EpJ6Vy2OTp9svOA7ifO X-Received: by 2002:a17:907:6092:b0:731:59f0:49ac with SMTP id ht18-20020a170907609200b0073159f049acmr11463238ejc.383.1660594556960; Mon, 15 Aug 2022 13:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594556; cv=none; d=google.com; s=arc-20160816; b=qWLDyCA76DSyxbt+A5b8O0a7QYS0aDFjB8JfokdpHrfrLAteCgMlBNpf0EYnaAua+Z UvDOP3ZsoeDKw6smwaLOFAIoe45WqkYrgV6aL7G1Ckp0fhR0yHLlYMjzmRLTyTu71IO0 Wd2etvtnK4XBDOG5ZE8eJMSl/FBVjL7dVSnays9+tmfuGgqWlbq8pQ8lmkCHjdbRrMs/ 4rEKMBkMKexQdR8bH8flFcD75GPFbtARgTZpQ22HC88DDg0Kr0HH4IOox47YEzuJJxUX B6N7NsJrQX1WmswG2fsNq0zUcrH06EsHb5VFU1T0s0r4OoubdWxyrg0XOrIVCZ8iyvCU z+Xg== 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=dPG2Rh/U7fuenLL/pxvuNPqO9FCmJAEfq8NrXCnUCGE=; b=JFExEAS4EbqwBOe3c8VunB2P6foS9y3/xSy2KTQwBTslyxkPmWf92cJusVaZNI/npY rG4nggZg3HFnkOVi9+OsHm1qzT7NZ0I5qKXRdJQbITY4TQ1eCwsYROKDTkyecC/eIy4y ii0JndcyKa2ZQ7hXh/11EuGzb6pLahy+EwHv0p5u8JVyHCE7uGdV35szlQ65OIuLJCCr TK0QYc/s8kwPZRdVuKjxHRFJXIqnqyLyf4wFcqZxb/q/kc7ZsGYQZbHIjjRtZEdqd0d7 Na/Nj3Lor1SxMZTUxQM4gWGStynuJ8fpyq0sHGJGfTAAexlOSz4lQDTP0twyNoZtqcfV wjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="bEpay/Rx"; 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 h9-20020a05640250c900b0043e33c1d5eesi9491402edb.230.2022.08.15.13.15.31; Mon, 15 Aug 2022 13:15:56 -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="bEpay/Rx"; 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 S1343543AbiHOTKO (ORCPT + 99 others); Mon, 15 Aug 2022 15:10:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343583AbiHOTGl (ORCPT ); Mon, 15 Aug 2022 15:06:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E0752F1; Mon, 15 Aug 2022 11:35:17 -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 2F6ED6111E; Mon, 15 Aug 2022 18:35:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 288DFC433D6; Mon, 15 Aug 2022 18:35:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588516; bh=OXU6gWN+TFhf/Eb7663ju9r2gZoBdA9HTNpedrm1o+g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bEpay/RxhWowvAPJRy/tK830BTo5dntv2aS0jfZ8nLfOX9eZI9/KF4bpnpBxn7Bde tgaLfYX5TOVou8iHWluEd9KPfgYxVu169vvyWJ0jMP5wUeIR7BRN17D7WYbit1Jua3 WT9pT/Roc2VmURvJtwN56zc7lJ3WqSbxV/2ZuQaQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quinn Tran , Nilesh Javali , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.15 398/779] scsi: qla2xxx: edif: Synchronize NPIV deletion with authentication application Date: Mon, 15 Aug 2022 20:00:42 +0200 Message-Id: <20220815180354.283823621@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 cf79716e6636400ae38c37bc8a652b1e522abbba ] Notify authentication application of a NPIV deletion event is about to occur. This allows app to perform cleanup. Link: https://lore.kernel.org/r/20220607044627.19563-7-njavali@marvell.com Fixes: 9efea843a906 ("scsi: qla2xxx: edif: Add detection of secure device") 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_edif_bsg.h | 2 ++ drivers/scsi/qla2xxx/qla_mid.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_edif_bsg.h b/drivers/scsi/qla2xxx/qla_edif_bsg.h index 53026d82ebff..af9f1ffb1e4a 100644 --- a/drivers/scsi/qla2xxx/qla_edif_bsg.h +++ b/drivers/scsi/qla2xxx/qla_edif_bsg.h @@ -217,4 +217,6 @@ struct auth_complete_cmd { #define RX_DELAY_DELETE_TIMEOUT 20 +#define FCH_EVT_VENDOR_UNIQUE_VPORT_DOWN 1 + #endif /* QLA_EDIF_BSG_H */ diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index e6b5c4ccce97..eb43a5f1b399 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c @@ -166,9 +166,13 @@ qla24xx_disable_vp(scsi_qla_host_t *vha) int ret = QLA_SUCCESS; fc_port_t *fcport; - if (vha->hw->flags.edif_enabled) + if (vha->hw->flags.edif_enabled) { + if (DBELL_ACTIVE(vha)) + qla2x00_post_aen_work(vha, FCH_EVT_VENDOR_UNIQUE, + FCH_EVT_VENDOR_UNIQUE_VPORT_DOWN); /* delete sessions and flush sa_indexes */ qla2x00_wait_for_sess_deletion(vha); + } if (vha->hw->flags.fw_started) ret = qla24xx_control_vp(vha, VCE_COMMAND_DISABLE_VPS_LOGO_ALL); -- 2.35.1