Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2931193iog; Mon, 20 Jun 2022 07:44:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1upOwX4tuYX/it4Lk+eny8TXU0w+dbXurt3mdIaT219YoHl5ajsMgTxMyIukFPwymkFVAWm X-Received: by 2002:a17:902:d481:b0:167:770b:67c with SMTP id c1-20020a170902d48100b00167770b067cmr24554898plg.77.1655736258752; Mon, 20 Jun 2022 07:44:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655736258; cv=none; d=google.com; s=arc-20160816; b=outfwgC20Ek+0k5lSoCFE/UwRM0GpfWUiY3AYO8Kz4N2rUPYp0WdsTEXqQJWlzOSbI +wZpARVvNpSMdw3seIzwvMOh7Ev4BGqjgwwaCR5zWhaqdnqoPMg3KHXaJTud1IBYmRFs lPDE51LaAadIdtaM5LWwriA+RAsOsY3hG/EaLDYgP3l4ClrT99OU/RvagQGhnK3wFwFB 87KSxx6sqDuHLUM/OR1W2dEvyN5/ftjOoUoWHiIUVcidC4r/mLmNzfZbITJk7E3fLoPI kSwejKEoLBZai6Afbf/liaZhcevk4z2QMHQdpMuyVwXvavJN2+RFE0gsuJw4WeOTsHuJ 928w== 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=IWa2vCNneYzbEj5ujXDrWNyeZI/HbCkZz13VWcsM8Kc=; b=Bcs24WwKHomHIDZTrawnNXXWhQ5BghklIZGQAuNMh9rKWFZhrcm3MI/IR0aOWxfMbB rHOuvp6h6a/cEKxJitscJXLejpCjhQYOrD8U8rwDagVes5yju6z6iA+R5qnY/Zcr0jvb blqmonJCZKODIm14sT+aRPHMCFlUqraXIeNmoO/miWPlVAWy5Rzsvp9Nefry8f8GAxKo 5z9TCoIocO8uQ2zWZcOcWzb1QE6i8TltIl0HdZD45RkW90gm8P1/42pez6kgKFo25n2f hy9cNO+OY/fk+ebpGZ/mGEpZ6FMlqBDR82rKWRLZeC9Lne0MW0c6JGCdBUzZqCJDtYbW FDvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ymkqtjnx; 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 d14-20020aa7868e000000b00525215ea340si4149002pfo.70.2022.06.20.07.44.06; Mon, 20 Jun 2022 07:44: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=ymkqtjnx; 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 S1351029AbiFTOLn (ORCPT + 99 others); Mon, 20 Jun 2022 10:11:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344645AbiFTNy2 (ORCPT ); Mon, 20 Jun 2022 09:54:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61D4331934; Mon, 20 Jun 2022 06:20:50 -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 470D5B80E7D; Mon, 20 Jun 2022 13:20:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83B81C3411C; Mon, 20 Jun 2022 13:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655731239; bh=gpkYebRH4SEsKpxmhmXzkbXxcODhpgm2UHDw0rYNRNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ymkqtjnxLGDENSBnctJRIejOV22U1uqO00SzqYKZhsX6cxsMuJDD1vYjZ+IYXQ5Y9 cefdPlaKwAnTsCSOhqP5nbBG+REUEuAwYWdy3ZjIO2KIHqD9YVzAHwTfRBPijWJT45 Xxa+nt9H3hRR/IhSp0ifiQCQrU5kBIkWB+ShU0tY= 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.4 195/240] scsi: lpfc: Allow reduced polling rate for nvme_admin_async_event cmd completion Date: Mon, 20 Jun 2022 14:51:36 +0200 Message-Id: <20220620124744.636617622@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124737.799371052@linuxfoundation.org> References: <20220620124737.799371052@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 b8a772f80d6c..cbea3e0c1a7d 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h @@ -4249,6 +4249,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 5a86a1ee0de3..193c1a81cac0 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/drivers/scsi/lpfc/lpfc_nvme.c @@ -1202,7 +1202,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; @@ -1258,8 +1259,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