aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/Kconfig14
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c7
-rw-r--r--drivers/scsi/lpfc/lpfc_nvme.c8
-rw-r--r--drivers/scsi/lpfc/lpfc_nvmet.c8
5 files changed, 17 insertions, 24 deletions
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 4bf55b5d78be..3c52867dfe28 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -1253,20 +1253,6 @@ config SCSI_LPFC_DEBUG_FS
1253 This makes debugging information from the lpfc driver 1253 This makes debugging information from the lpfc driver
1254 available via the debugfs filesystem. 1254 available via the debugfs filesystem.
1255 1255
1256config LPFC_NVME_INITIATOR
1257 bool "Emulex LightPulse Fibre Channel NVME Initiator Support"
1258 depends on SCSI_LPFC && NVME_FC
1259 ---help---
1260 This enables NVME Initiator support in the Emulex lpfc driver.
1261
1262config LPFC_NVME_TARGET
1263 bool "Emulex LightPulse Fibre Channel NVME Initiator Support"
1264 depends on SCSI_LPFC && NVME_TARGET_FC
1265 ---help---
1266 This enables NVME Target support in the Emulex lpfc driver.
1267 Target enablement must still be enabled on a per adapter
1268 basis by module parameters.
1269
1270config SCSI_SIM710 1256config SCSI_SIM710
1271 tristate "Simple 53c710 SCSI support (Compaq, NCR machines)" 1257 tristate "Simple 53c710 SCSI support (Compaq, NCR machines)"
1272 depends on (EISA || MCA) && SCSI 1258 depends on (EISA || MCA) && SCSI
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index fbd3a563be53..84aa62f1a4de 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -3315,9 +3315,9 @@ LPFC_ATTR_R(nvmet_mrq_post, LPFC_DEF_MRQ_POST,
3315 * lpfc_enable_fc4_type: Defines what FC4 types are supported. 3315 * lpfc_enable_fc4_type: Defines what FC4 types are supported.
3316 * Supported Values: 1 - register just FCP 3316 * Supported Values: 1 - register just FCP
3317 * 3 - register both FCP and NVME 3317 * 3 - register both FCP and NVME
3318 * Supported values are [1,3]. Default value is 3 3318 * Supported values are [1,3]. Default value is 1
3319 */ 3319 */
3320LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_BOTH, 3320LPFC_ATTR_R(enable_fc4_type, LPFC_ENABLE_FCP,
3321 LPFC_ENABLE_FCP, LPFC_ENABLE_BOTH, 3321 LPFC_ENABLE_FCP, LPFC_ENABLE_BOTH,
3322 "Define fc4 type to register with fabric."); 3322 "Define fc4 type to register with fabric.");
3323 3323
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 2697d49da4d7..6cc561b04211 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5891,10 +5891,17 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
5891 /* Check to see if it matches any module parameter */ 5891 /* Check to see if it matches any module parameter */
5892 for (i = 0; i < lpfc_enable_nvmet_cnt; i++) { 5892 for (i = 0; i < lpfc_enable_nvmet_cnt; i++) {
5893 if (wwn == lpfc_enable_nvmet[i]) { 5893 if (wwn == lpfc_enable_nvmet[i]) {
5894#if (IS_ENABLED(CONFIG_NVME_TARGET_FC))
5894 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 5895 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
5895 "6017 NVME Target %016llx\n", 5896 "6017 NVME Target %016llx\n",
5896 wwn); 5897 wwn);
5897 phba->nvmet_support = 1; /* a match */ 5898 phba->nvmet_support = 1; /* a match */
5899#else
5900 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
5901 "6021 Can't enable NVME Target."
5902 " NVME_TARGET_FC infrastructure"
5903 " is not in kernel\n");
5904#endif
5898 } 5905 }
5899 } 5906 }
5900 } 5907 }
diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 0a4c19081409..0024de1c6c1f 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -2149,7 +2149,7 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport)
2149 /* localport is allocated from the stack, but the registration 2149 /* localport is allocated from the stack, but the registration
2150 * call allocates heap memory as well as the private area. 2150 * call allocates heap memory as well as the private area.
2151 */ 2151 */
2152#ifdef CONFIG_LPFC_NVME_INITIATOR 2152#if (IS_ENABLED(CONFIG_NVME_FC))
2153 ret = nvme_fc_register_localport(&nfcp_info, &lpfc_nvme_template, 2153 ret = nvme_fc_register_localport(&nfcp_info, &lpfc_nvme_template,
2154 &vport->phba->pcidev->dev, &localport); 2154 &vport->phba->pcidev->dev, &localport);
2155#else 2155#else
@@ -2190,7 +2190,7 @@ lpfc_nvme_create_localport(struct lpfc_vport *vport)
2190void 2190void
2191lpfc_nvme_destroy_localport(struct lpfc_vport *vport) 2191lpfc_nvme_destroy_localport(struct lpfc_vport *vport)
2192{ 2192{
2193#ifdef CONFIG_LPFC_NVME_INITIATOR 2193#if (IS_ENABLED(CONFIG_NVME_FC))
2194 struct nvme_fc_local_port *localport; 2194 struct nvme_fc_local_port *localport;
2195 struct lpfc_nvme_lport *lport; 2195 struct lpfc_nvme_lport *lport;
2196 struct lpfc_nvme_rport *rport = NULL, *rport_next = NULL; 2196 struct lpfc_nvme_rport *rport = NULL, *rport_next = NULL;
@@ -2274,7 +2274,7 @@ lpfc_nvme_update_localport(struct lpfc_vport *vport)
2274int 2274int
2275lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) 2275lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2276{ 2276{
2277#ifdef CONFIG_LPFC_NVME_INITIATOR 2277#if (IS_ENABLED(CONFIG_NVME_FC))
2278 int ret = 0; 2278 int ret = 0;
2279 struct nvme_fc_local_port *localport; 2279 struct nvme_fc_local_port *localport;
2280 struct lpfc_nvme_lport *lport; 2280 struct lpfc_nvme_lport *lport;
@@ -2403,7 +2403,7 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2403void 2403void
2404lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) 2404lpfc_nvme_unregister_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
2405{ 2405{
2406#ifdef CONFIG_LPFC_NVME_INITIATOR 2406#if (IS_ENABLED(CONFIG_NVME_FC))
2407 int ret; 2407 int ret;
2408 struct nvme_fc_local_port *localport; 2408 struct nvme_fc_local_port *localport;
2409 struct lpfc_nvme_lport *lport; 2409 struct lpfc_nvme_lport *lport;
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index b7739a554fe0..7ca868f394da 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -671,7 +671,7 @@ lpfc_nvmet_create_targetport(struct lpfc_hba *phba)
671 lpfc_tgttemplate.target_features = NVMET_FCTGTFEAT_READDATA_RSP | 671 lpfc_tgttemplate.target_features = NVMET_FCTGTFEAT_READDATA_RSP |
672 NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED; 672 NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED;
673 673
674#ifdef CONFIG_LPFC_NVME_TARGET 674#if (IS_ENABLED(CONFIG_NVME_TARGET_FC))
675 error = nvmet_fc_register_targetport(&pinfo, &lpfc_tgttemplate, 675 error = nvmet_fc_register_targetport(&pinfo, &lpfc_tgttemplate,
676 &phba->pcidev->dev, 676 &phba->pcidev->dev,
677 &phba->targetport); 677 &phba->targetport);
@@ -756,7 +756,7 @@ lpfc_sli4_nvmet_xri_aborted(struct lpfc_hba *phba,
756void 756void
757lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba) 757lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba)
758{ 758{
759#ifdef CONFIG_LPFC_NVME_TARGET 759#if (IS_ENABLED(CONFIG_NVME_TARGET_FC))
760 struct lpfc_nvmet_tgtport *tgtp; 760 struct lpfc_nvmet_tgtport *tgtp;
761 761
762 if (phba->nvmet_support == 0) 762 if (phba->nvmet_support == 0)
@@ -788,7 +788,7 @@ static void
788lpfc_nvmet_unsol_ls_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, 788lpfc_nvmet_unsol_ls_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
789 struct hbq_dmabuf *nvmebuf) 789 struct hbq_dmabuf *nvmebuf)
790{ 790{
791#ifdef CONFIG_LPFC_NVME_TARGET 791#if (IS_ENABLED(CONFIG_NVME_TARGET_FC))
792 struct lpfc_nvmet_tgtport *tgtp; 792 struct lpfc_nvmet_tgtport *tgtp;
793 struct fc_frame_header *fc_hdr; 793 struct fc_frame_header *fc_hdr;
794 struct lpfc_nvmet_rcv_ctx *ctxp; 794 struct lpfc_nvmet_rcv_ctx *ctxp;
@@ -891,7 +891,7 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
891 struct rqb_dmabuf *nvmebuf, 891 struct rqb_dmabuf *nvmebuf,
892 uint64_t isr_timestamp) 892 uint64_t isr_timestamp)
893{ 893{
894#ifdef CONFIG_LPFC_NVME_TARGET 894#if (IS_ENABLED(CONFIG_NVME_TARGET_FC))
895 struct lpfc_nvmet_rcv_ctx *ctxp; 895 struct lpfc_nvmet_rcv_ctx *ctxp;
896 struct lpfc_nvmet_tgtport *tgtp; 896 struct lpfc_nvmet_tgtport *tgtp;
897 struct fc_frame_header *fc_hdr; 897 struct fc_frame_header *fc_hdr;