Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2931428iog; Mon, 20 Jun 2022 07:44:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1shetXsAhcQ4QaVzNuHCiiaC42+79WEhPnI4nMSYv0pRNOheQw4zYO9on3aLItYlaMxyk3L X-Received: by 2002:a63:7f07:0:b0:40c:4f26:9b05 with SMTP id a7-20020a637f07000000b0040c4f269b05mr16227195pgd.438.1655736276247; Mon, 20 Jun 2022 07:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736276; cv=none; d=google.com; s=arc-20160816; b=wdJ3Kb6J6zwOFLMrWVStZ2sz2F3GNEIlAsSfdAVKxmYOdQUPTxYij8Z346IWESRqgy D3rL7Q3ozygIRDymsOCjdxK6crrLKodlPE2cdQx3AAjRpjWIG46LDLIidWI8CzlsjzHC KxVRwCJid8yjtif2FogbBPpc6PbmqQTe4pno8aTC2GVsMAgnTq+8ItrlrPYP4SSvjW/+ wwj4sn92KjEaorhwO6ExpJlWuHnj9rD4SQbymvYzF5S3JxuXebjSkeXDljbASb3EHq7A KJaWGt2f4ONELp7M5caOY3Tqy8P8DMjeupqiQnc9APglLUyY6KD8MK1xRBqgvynyaryF mRQw== 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=yRvqGg7HTGcAKEE4DXQoWUIQztl9okyy/f72I61cszg=; b=WDHT6pqH4JxU6/T4w4QWw7pzRBLKOYPWoKtBwZdKi+yYuPt0+ZnkVKFPrTbWuFunY6 nSH/8Kl9RoKe+CStN/+QNV+99tVVS6kx2CRGO8PUz5cBKitllSMqLfZbzu8X7DxA8HMY +ywVS3qvMlrBGzQqiVlrt5dkHTSuZfdYu7s3M0EKjcFkbJWSa+usZN8KLnpwcVwLQlAc DPOLkAePf1nzzJSMUYAAD2tehlG9ZNx/4EHx2sm7c5tflLMr2qMYSM6JEbklSTK59QTZ 6jfTlrEnq//n/YcPFjjc+8QV1oy2DSP+WhLOYm94Dwh30S4B3yaYjZLpkPvBvwV6kOTF f7lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XzfF+v6K; 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 p11-20020a170902ebcb00b001614cd9cc52si12938469plg.197.2022.06.20.07.44.23; Mon, 20 Jun 2022 07:44:36 -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=XzfF+v6K; 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 S243786AbiFTNCJ (ORCPT + 99 others); Mon, 20 Jun 2022 09:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243942AbiFTM7H (ORCPT ); Mon, 20 Jun 2022 08:59:07 -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 DC04719C06; Mon, 20 Jun 2022 05:56:07 -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 43835614EE; Mon, 20 Jun 2022 12:56:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16D10C3411B; Mon, 20 Jun 2022 12:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729763; bh=Kk6o3/zjhbF2uiw5hY13A16AYGT/zqgM3J+eArhmefA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XzfF+v6Kv8T19VTpAqvpMzP0zMa3FqSt/CQsuTjuDbLbLipYWBy4vC+JgS0/MHpma sKplBt2XWfKnWKYlUbTDT2Xi/1LeSXiNHmPMq/AE/fsxcTRmu1J9LQpCSZnpwMJJFy QmlKKgiQ65TZ+W3bNGpuqz6ZY5S7r8AvlSXPFTG8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Justin Tee , James Smart , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 5.18 030/141] scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion Date: Mon, 20 Jun 2022 14:49:28 +0200 Message-Id: <20220620124730.421249120@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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: James Smart [ Upstream commit 2e7e9c0c1ec05f18d320ecc8a31eec59d2af1af9 ] NVMe Asynchronous Event Request commands have no command timeout value per specifications. Set WQE option to allow a reduced FLUSH polling rate for I/O error detection specifically for nvme_admin_async_event commands. Link: https://lore.kernel.org/r/20220603174329.63777-9-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/lpfc/lpfc_hw4.h | 3 +++ drivers/scsi/lpfc/lpfc_nvme.c | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 02e230ed6280..e7daef550095 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -4488,6 +4488,9 @@ struct wqe_common { #define wqe_sup_SHIFT 6 #define wqe_sup_MASK 0x00000001 #define wqe_sup_WORD word11 +#define wqe_ffrq_SHIFT 6 +#define wqe_ffrq_MASK 0x00000001 +#define wqe_ffrq_WORD word11 #define wqe_wqec_SHIFT 7 #define wqe_wqec_MASK 0x00000001 #define wqe_wqec_WORD word11 diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c index d3a542466e98..49f44d9d04ea 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -1194,7 +1194,8 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, { struct lpfc_hba *phba = vport->phba; struct nvmefc_fcp_req *nCmd = lpfc_ncmd->nvmeCmd; - struct lpfc_iocbq *pwqeq = &(lpfc_ncmd->cur_iocbq); + struct nvme_common_command *sqe; + struct lpfc_iocbq *pwqeq = &lpfc_ncmd->cur_iocbq; union lpfc_wqe128 *wqe = &pwqeq->wqe; uint32_t req_len; @@ -1251,8 +1252,14 @@ lpfc_nvme_prep_io_cmd(struct lpfc_vport *vport, cstat->control_requests++; } - if (pnode->nlp_nvme_info & NLP_NVME_NSLER) + if (pnode->nlp_nvme_info & NLP_NVME_NSLER) { bf_set(wqe_erp, &wqe->generic.wqe_com, 1); + sqe = &((struct nvme_fc_cmd_iu *) + nCmd->cmdaddr)->sqe.common; + if (sqe->opcode == nvme_admin_async_event) + bf_set(wqe_ffrq, &wqe->generic.wqe_com, 1); + } + /* * Finish initializing those WQE fields that are independent * of the nvme_cmnd request_buffer -- 2.35.1