Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2872686rwb; Mon, 15 Aug 2022 13:03:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR7axX88tdzggiyHEETbzjDgdUl1Y3Vy0R83GVE5salh1bmAJIAi4h2JuQOfNygKuUvPD1ck X-Received: by 2002:a17:90b:1e08:b0:1f5:1f0d:3736 with SMTP id pg8-20020a17090b1e0800b001f51f0d3736mr29608987pjb.58.1660593798957; Mon, 15 Aug 2022 13:03:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593798; cv=none; d=google.com; s=arc-20160816; b=lFxUBIb+Rkx/dsEdKPz/N8c/si3OwLjfLOAqh41e9iwyR5nyr4HNFhSX9zzkX5OjDo /tHiEXdFJgnkAUq6cE5lVWhc63mHrFI73Zpu+XPbDtGJRVBhH4rww363lpAfh+hnFwU+ Ntei7sdlrI6T83rkSa/DGBOkzy19kcmSKM+Xd8UOwPsDQCt8B4+O9Oq06RlsT7XKc64R wBMby+/yNo8RFHrTNkTk31YaEOIG1/MgFKLIDQwSDlmqLLORiAOT4Vx9stkw/fzuc+4O p6FXgB6b/VyYXI7L/u1UnFyH6IOTyV3cmSOwWWZcxVByzkMntPiwf23IQiScr1GV1v8D f9Ww== 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=+wXiXWMTcQokICSsAGKyg76A/ycferYZyd4GLXK+M7c=; b=J5mi5qj4rYgL+eNzAo/nCSirNPEtAIDm7s0AfpK2ZS+6MHzAp3G1tpjF/az1N/cT6J ERX2O+as6NSEACfjdfr55P8/OE+JZUSV63/9AKFtCPSK5rEmE8p+OBnbs5VMDNKyp+Ue K77gj7xPnDnjGroxpSmvCLhuHZazqWmppmkneClP2H4kg4Pq1fhSkQ7FgP8gGyZHAgQW Y4fW69NPcO5B99Vn3DmOOtAqa/XmLCvBpahfMT/0tVblVjjFLmZfvrJLXqcGADmvRQxX nNOwnfsjLjeAFOBGje8JEVdqOaBC+Egq6vLjLmrWw6MjDSUkJ4nvLX3pKCdSlAGKg7sO xWQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z3S0XcFJ; 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 q23-20020a170902edd700b0016f12f2cb15si10401581plk.405.2022.08.15.13.03.06; Mon, 15 Aug 2022 13:03:18 -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=z3S0XcFJ; 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 S1344029AbiHOTOl (ORCPT + 99 others); Mon, 15 Aug 2022 15:14:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344006AbiHOTLc (ORCPT ); Mon, 15 Aug 2022 15:11:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A524F4F69F; Mon, 15 Aug 2022 11:37:05 -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 AB974B81082; Mon, 15 Aug 2022 18:37:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01FB9C433C1; Mon, 15 Aug 2022 18:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588622; bh=dGIhvIVlTqjvge9VTLyUtZVpVLlYTitEQSS0D6+X9eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z3S0XcFJ652j5o7+wk2yG82Mz0mUXJzkk6dW7R2SrzZOMfQazLIFnFMPhTmiATydE oQqj16zsxDveZK02srQY3l/5suEl9UOQuHk6LgJgXXlsBBN/9ZGqEmrUD/FhmNK1Vm jM0vhU+YoGtmxcIhtDRWmYeOwCAYbBexAsshSukU= 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.15 422/779] scsi: qla2xxx: edif: Tear down session if keys have been removed Date: Mon, 15 Aug 2022 20:01:06 +0200 Message-Id: <20220815180355.297007226@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 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 883b3fb07c2c..4fc289815ccb 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 c3711ab68c3d..c41a965eb4a7 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -3420,6 +3420,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