Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3013458rwb; Mon, 15 Aug 2022 16:09:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7GcK+E8Z/UPZfL4Qm8zKrTzcHN/8yEzJK0dht3MZ2D6ShLXfjJW9f3Hf7viQEFCxWOnB3r X-Received: by 2002:a05:6402:298a:b0:43a:76f8:a75c with SMTP id eq10-20020a056402298a00b0043a76f8a75cmr16736309edb.216.1660604953011; Mon, 15 Aug 2022 16:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660604953; cv=none; d=google.com; s=arc-20160816; b=dnAuKTUv6bzdCbCIBUFHKGFku89XExMeJDE/frymQqDHUgc2VpT+5nnpAv/YYRfYV9 OoCASDMdw1jXdgaxVw/hoMjvnghZhBkPWnK4DTHVhkQOrYwVI/JMEqHqu+1BWbrx5g4W VlfFrLbHEVDkTU6H9yDsNlnpqh3WkHekQQyx9RbHNv2n3avPJQ6QSnOIoklErT+DNjcd bY44GJq5Oe7bZLG15QvM69x+PJIyKCpEESFAk8RbmrloXQCnp/q4oGVCVUkhXidlHqe8 JC4HOtx1ZjjfRwXFk5SScm9FAkMZ0727nJgG+pm2vlFehTyLbf52BO8tQz1ktz605otE SH0g== 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=oFm1AaOgu3s9puSiv6QCMuKN+HOeqrI8/DcatIswp3Hvj5AVenvsin52khdVS3LvRx paSE2kDc5fokFK/4R1AGP42PDBZ0opNTq+929wD9dtOQkptL8Yb0Qf1qc3wIx64Y+XHi 3CMzvpbeXrrAcRRpGj8mI/zMJIoRbl+HcuCVLIWN4YfpDGeJbiSIY5aVUlFtJFD6XIOI PSlu5pphxMOTUrC2Br0UiobMt/ejWMzXmm8kJASAx2NAApQ/4MLEpXhnquAYE1Xf7M1y R1p5VAh1/2EkqQ9pLHrwLLJdjcl2LQpqqQUu1F3i68ANyJLvrmo8JnJuBpT2QvNef/a5 rYeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=foa4AwPr; 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 y16-20020a50ce10000000b0043dba64d40asi8464969edi.399.2022.08.15.16.08.47; Mon, 15 Aug 2022 16:09:12 -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=foa4AwPr; 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 S1348506AbiHOVdb (ORCPT + 99 others); Mon, 15 Aug 2022 17:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348569AbiHOVbg (ORCPT ); Mon, 15 Aug 2022 17:31:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E954DF0745; Mon, 15 Aug 2022 12:24:13 -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 E8AC3610A2; Mon, 15 Aug 2022 19:24:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D027BC433D7; Mon, 15 Aug 2022 19:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591452; bh=i8hmpQ53bR+sr3him2AXH2AmyhXku3SVxEQnzBlMJxQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=foa4AwPr9KderzW8y2tdRNnWslYsCfUBWEavbUKkaBbE+WCawk5wqEpoSA+lTrGmJ Cdy6bJAvDz+PEmWkDmKbKFUnm5YbjE+rd+KqUvnmzWXfh8BXTwISrh9Cx3/blJFVOb WR3DHE8MH1pCl0FpjFTf5CX2mkFjqRitZrAJoZ10= 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.18 0577/1095] scsi: qla2xxx: edif: Tear down session if keys have been removed Date: Mon, 15 Aug 2022 19:59:36 +0200 Message-Id: <20220815180453.443224603@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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