Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5939888pxb; Mon, 14 Feb 2022 11:12:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZWuLa5W0WOgYifBGzPuN5W+AGsGSNBpDWD/qq2NjHl3fmzGJae3JFUI3KsOV48qO44ZTw X-Received: by 2002:aa7:9634:: with SMTP id r20mr91757pfg.57.1644865953336; Mon, 14 Feb 2022 11:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644865953; cv=none; d=google.com; s=arc-20160816; b=jx/LJqzWJqNGalN6fyXtQUjV0Sb25eEg2XXGu/7towQ6VqGJAPz64VsmEb4s0A8dfN 6DluEsnzXCZCk44zaertr0as68z2ujIIqehznoau8V/mH/x6enCii7fr21jUUZzWeSad D2StGTzapJprNfdWyz278ToxU/0acVFJw/wapzrvsd0wvWYHHClwyN5H/3Zp+YEN8XD5 a7dHYKPAk94Qz7VVQKd3m7jitfOzbc3v+Y8+1/CLkmvmVaFaAs/KzbzGw7U86ja+PJPQ aOxCZ2+VSv7QuXSuD1dLPMwm6/dhgZsv0qMxuQw3uERZQjKL4ORJtiB7TmD2UJJQ6bkq Hx1w== 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=wsL10axbToRUVAAcGw/268x44wMbhmzial6L3kB00lM=; b=MLmKCHvXWcxOILO2Du65jtiMvMq0gcWN9TWi8lJXfXujJQwerthct75YC81jNOIQU2 vTcWE0HETYZMwdYzv1O72VigqKp+3JtVFO7TdOJzKTqK8zwIOObhqdQMsPRVlXRYvp1m jclfZB0uFF5QCTXZhqcklbjEECUHmgYb8TbairB9TcorweSL/Pws/XLFjqhdJ/6yKZTm qQvMOV1MNQqQz97PQzsUWC673vrqPaxt0Xv5v1KvHQE5TqT8OgiPhMo9u5+MIavHnzSJ heQSYSICLPBbeAp/zb3bi/HGayr5UaxIoOw69zARpa1feagyViWXIsjWASVGiRBazD+u FWsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=R77IBMPI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d6si31604423pfv.47.2022.02.14.11.12.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:12:33 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=R77IBMPI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F9C92AF0; Mon, 14 Feb 2022 11:07:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344226AbiBNJ67 (ORCPT + 99 others); Mon, 14 Feb 2022 04:58:59 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343693AbiBNJxt (ORCPT ); Mon, 14 Feb 2022 04:53:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F3936D973; Mon, 14 Feb 2022 01:43:55 -0800 (PST) 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 EF8FB61238; Mon, 14 Feb 2022 09:43:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 597C5C340E9; Mon, 14 Feb 2022 09:43:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644831834; bh=vr2L1ej+nJKwgQ0hPgDDDjwiXoPblqaNFaQQnQx4RNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R77IBMPIX3uYVE2u23FJ7GRgj5dYy8vZPZCBMOMKXvp/SG2q+PsGfxr97bojpCUbX kUTx7InMmQxMr5I39gGj5foWIh+mx3vuBNi1LWSTug3jCytr3tXr7dK3rNQqbGREju HbsoM1H7ZJQ0mCS+IXfqb4nILPXRWvZWW+yp1qxQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Ewan D. Milne" , James Smart , "Martin K. Petersen" Subject: [PATCH 5.10 112/116] scsi: lpfc: Remove NVMe support if kernel has NVME_FC disabled Date: Mon, 14 Feb 2022 10:26:51 +0100 Message-Id: <20220214092502.661491240@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220214092458.668376521@linuxfoundation.org> References: <20220214092458.668376521@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 commit c80b27cfd93ba9f5161383f798414609e84729f3 upstream. The driver is initiating NVMe PRLIs to determine device NVMe support. This should not be occurring if CONFIG_NVME_FC support is disabled. Correct this by changing the default value for FC4 support. Currently it defaults to FCP and NVMe. With change, when NVME_FC support is not enabled in the kernel, the default value is just FCP. Link: https://lore.kernel.org/r/20220207180516.73052-1-jsmart2021@gmail.com Reviewed-by: Ewan D. Milne Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/lpfc/lpfc.h | 13 ++++++++++--- drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h @@ -898,6 +898,16 @@ struct lpfc_hba { uint32_t cfg_hostmem_hgp; uint32_t cfg_log_verbose; uint32_t cfg_enable_fc4_type; +#define LPFC_ENABLE_FCP 1 +#define LPFC_ENABLE_NVME 2 +#define LPFC_ENABLE_BOTH 3 +#if (IS_ENABLED(CONFIG_NVME_FC)) +#define LPFC_MAX_ENBL_FC4_TYPE LPFC_ENABLE_BOTH +#define LPFC_DEF_ENBL_FC4_TYPE LPFC_ENABLE_BOTH +#else +#define LPFC_MAX_ENBL_FC4_TYPE LPFC_ENABLE_FCP +#define LPFC_DEF_ENBL_FC4_TYPE LPFC_ENABLE_FCP +#endif uint32_t cfg_aer_support; uint32_t cfg_sriov_nr_virtfn; uint32_t cfg_request_firmware_upgrade; @@ -918,9 +928,6 @@ struct lpfc_hba { uint32_t cfg_ras_fwlog_func; uint32_t cfg_enable_bbcr; /* Enable BB Credit Recovery */ uint32_t cfg_enable_dpp; /* Enable Direct Packet Push */ -#define LPFC_ENABLE_FCP 1 -#define LPFC_ENABLE_NVME 2 -#define LPFC_ENABLE_BOTH 3 uint32_t cfg_enable_pbde; struct nvmet_fc_target_port *targetport; lpfc_vpd_t vpd; /* vital product data */ --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -3797,8 +3797,8 @@ LPFC_ATTR_R(nvmet_mrq_post, * 3 - register both FCP and NVME * Supported values are [1,3]. Default value is 3 */ -LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_BOTH, - LPFC_ENABLE_FCP, LPFC_ENABLE_BOTH, +LPFC_ATTR_R(enable_fc4_type, LPFC_DEF_ENBL_FC4_TYPE, + LPFC_ENABLE_FCP, LPFC_MAX_ENBL_FC4_TYPE, "Enable FC4 Protocol support - FCP / NVME"); /*