Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3261560rwb; Mon, 15 Aug 2022 22:36:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR73thxujRIOfBlnlF94i+ab+U2w8Medo2fmSbms41Bx+wcIb1og65K6OrD739o+NYjK26h9 X-Received: by 2002:a65:44c1:0:b0:428:ab8f:62dd with SMTP id g1-20020a6544c1000000b00428ab8f62ddmr7836746pgs.211.1660628204237; Mon, 15 Aug 2022 22:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660628204; cv=none; d=google.com; s=arc-20160816; b=xVMttHJWuanxaZMgWcIbJokJIqHtUlqTXDrEBbSLtVZpN+w7Jyh6gB1O6MNxmUAJQY qincsgjrvYBjkY1UlxKjQSodO4qtBjKuAm09SHx1HvxvlgSMcHZulekSxyJZDkUtAnMp y6IbZ6VNf+rj90uMPpa2L87KR38Anr1mi0a4kexNR7mqZvjhY2pnl2Re5Qvw3MmUM5Qc rI8ohwMAtDAI54OaOTeqw/28S0XiCM/5/cRmRBA/ZApdlMvQQBu7mRiIkwz+F9YfZJcw Lpgs/XOICxNAHkb/7zCRj47Gx71T4fSwEAi8Bs/3y2Z5WCuE0TeviW9JqztDdz7HgXU9 8duw== 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=J44TvYywrWYmu+1C1h9Hz8Sc7a/LCtWEoxQgybf491s=; b=z2Ybl3FMntoP9R17vlJMCrutGNqtAV3uf7heprEeCcsTIuAnQXJwP8NCJfqMMCiZzc fkqX16wjmLvKmbG6uq5TWCMMDwONB+fO+dzcf0E8XFb9s6ePDedhCGEf9Tp/Dw8tNixr w5Za5II8pL2+XAhrCf3OwRYcuNnvl8BqgUpRUt1z+2rzlXtJNAsTU6uu87wOo5ZqMROU NdO0KKIVKiJ0VSIMBq8SXODP2EfWx0bZgAmSxHBH/FRV+uXlGH5QjQW2HEXXhetO4Edo 21K5Zu2lp6zH3LcxZlr8bdi81ijMhOPR+pzrkBxAavk29r0s11md313b2XpCbgNiZ8AB 9lNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jn3We1sq; 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 j1-20020a63fc01000000b0041b539aec98si12211077pgi.816.2022.08.15.22.36.33; Mon, 15 Aug 2022 22:36:44 -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=Jn3We1sq; 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 S230401AbiHPEet (ORCPT + 99 others); Tue, 16 Aug 2022 00:34:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230112AbiHPEeP (ORCPT ); Tue, 16 Aug 2022 00:34:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE520C6CFA; Mon, 15 Aug 2022 13:24:52 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5A757B8119D; Mon, 15 Aug 2022 20:24:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83ECAC433D7; Mon, 15 Aug 2022 20:24:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595090; bh=i8hmpQ53bR+sr3him2AXH2AmyhXku3SVxEQnzBlMJxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jn3We1sq65fXXCeGjo6HDILmd94H1qALd9B9/mdGRGvXYFLi4hCl4HhyL41Ei8sF5 7qdq8SOxMyMgcypTWuEqUCNr5+mzjLfLHS3dS4Yz6UiMCwSMVUaYjtvrIORl5pohnM NLqdQEgAVfMSMF8DZb200rJ7q03J+OEPEXeLLeR0= 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 0621/1157] scsi: qla2xxx: edif: Tear down session if keys have been removed Date: Mon, 15 Aug 2022 19:59:37 +0200 Message-Id: <20220815180504.501777772@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 d7e2e4a68fc047a025afcd200e6b7e1fbc8b1999 ] If all keys for a session have been deleted, trigger a session teardown. Link: https://lore.kernel.org/r/20220608115849.16693-6-njavali@marvell.com Fixes: dd30706e73b7 ("scsi: qla2xxx: edif: Add key update") 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_def.h | 5 +++++ drivers/scsi/qla2xxx/qla_isr.c | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c2b92a6fef90..4062d46f33a6 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -2158,6 +2158,11 @@ typedef struct { #define CS_IOCB_ERROR 0x31 /* Generic error for IOCB request failure */ #define CS_REJECT_RECEIVED 0x4E /* Reject received */ +#define CS_EDIF_AUTH_ERROR 0x63 /* decrypt error */ +#define CS_EDIF_PAD_LEN_ERROR 0x65 /* pad > frame size, not 4byte align */ +#define CS_EDIF_INV_REQ 0x66 /* invalid request */ +#define CS_EDIF_SPI_ERROR 0x67 /* rx frame unable to locate sa */ +#define CS_EDIF_HDR_ERROR 0x69 /* data frame != expected len */ #define CS_BAD_PAYLOAD 0x80 /* Driver defined */ #define CS_UNKNOWN 0x81 /* Driver defined */ #define CS_RETRY 0x82 /* Driver defined */ diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 5deea6bff09f..ad55eace66aa 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -3424,6 +3424,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) case CS_PORT_UNAVAILABLE: case CS_TIMEOUT: case CS_RESET: + case CS_EDIF_INV_REQ: /* * We are going to have the fc class block the rport -- 2.35.1