From: Greg Kroah-Hartman Date: Mon, 14 Feb 2022 07:13:19 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v4.9.302~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=090a1ec7427fd8a7d406a57de452603862c5edf1;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: scsi-lpfc-remove-nvme-support-if-kernel-has-nvme_fc-disabled.patch --- diff --git a/queue-5.4/scsi-lpfc-remove-nvme-support-if-kernel-has-nvme_fc-disabled.patch b/queue-5.4/scsi-lpfc-remove-nvme-support-if-kernel-has-nvme_fc-disabled.patch new file mode 100644 index 00000000000..746c9ae944d --- /dev/null +++ b/queue-5.4/scsi-lpfc-remove-nvme-support-if-kernel-has-nvme_fc-disabled.patch @@ -0,0 +1,68 @@ +From c80b27cfd93ba9f5161383f798414609e84729f3 Mon Sep 17 00:00:00 2001 +From: James Smart +Date: Mon, 7 Feb 2022 10:05:16 -0800 +Subject: scsi: lpfc: Remove NVMe support if kernel has NVME_FC disabled + +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 +@@ -870,6 +870,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; +@@ -892,9 +902,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 +@@ -3839,8 +3839,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"); + + /* diff --git a/queue-5.4/series b/queue-5.4/series index cba0b7ada2c..e96da9335fa 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -66,3 +66,4 @@ usb-serial-cp210x-add-ncr-retail-io-box-id.patch usb-serial-cp210x-add-cpi-bulk-coin-recycler-id.patch seccomp-invalidate-seccomp-mode-to-catch-death-failures.patch hwmon-dell-smm-speed-up-setting-of-fan-speed.patch +scsi-lpfc-remove-nvme-support-if-kernel-has-nvme_fc-disabled.patch