scsi: lpfc: Rework lpfc Kconfig for NVME options
Reworked Kconfig so that lfpc only requires the scsi stack. NVME Initiator and NVME Target support can be enabled if the other NVMe subsystems have been enabled. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
856984b71c
commit
166d721120
@@ -671,9 +671,13 @@ lpfc_nvmet_create_targetport(struct lpfc_hba *phba)
|
||||
lpfc_tgttemplate.target_features = NVMET_FCTGTFEAT_READDATA_RSP |
|
||||
NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED;
|
||||
|
||||
#ifdef CONFIG_LPFC_NVME_TARGET
|
||||
error = nvmet_fc_register_targetport(&pinfo, &lpfc_tgttemplate,
|
||||
&phba->pcidev->dev,
|
||||
&phba->targetport);
|
||||
#else
|
||||
error = -ENOMEM;
|
||||
#endif
|
||||
if (error) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_NVME_DISC,
|
||||
"6025 Cannot register NVME targetport "
|
||||
@@ -752,6 +756,7 @@ lpfc_sli4_nvmet_xri_aborted(struct lpfc_hba *phba,
|
||||
void
|
||||
lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba)
|
||||
{
|
||||
#ifdef CONFIG_LPFC_NVME_TARGET
|
||||
struct lpfc_nvmet_tgtport *tgtp;
|
||||
|
||||
if (phba->nvmet_support == 0)
|
||||
@@ -763,6 +768,7 @@ lpfc_nvmet_destroy_targetport(struct lpfc_hba *phba)
|
||||
wait_for_completion_timeout(&tgtp->tport_unreg_done, 5);
|
||||
}
|
||||
phba->targetport = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -782,6 +788,7 @@ static void
|
||||
lpfc_nvmet_unsol_ls_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
|
||||
struct hbq_dmabuf *nvmebuf)
|
||||
{
|
||||
#ifdef CONFIG_LPFC_NVME_TARGET
|
||||
struct lpfc_nvmet_tgtport *tgtp;
|
||||
struct fc_frame_header *fc_hdr;
|
||||
struct lpfc_nvmet_rcv_ctx *ctxp;
|
||||
@@ -862,6 +869,7 @@ dropit:
|
||||
|
||||
atomic_inc(&tgtp->xmt_ls_abort);
|
||||
lpfc_nvmet_unsol_ls_issue_abort(phba, ctxp, sid, oxid);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -883,6 +891,7 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
|
||||
struct rqb_dmabuf *nvmebuf,
|
||||
uint64_t isr_timestamp)
|
||||
{
|
||||
#ifdef CONFIG_LPFC_NVME_TARGET
|
||||
struct lpfc_nvmet_rcv_ctx *ctxp;
|
||||
struct lpfc_nvmet_tgtport *tgtp;
|
||||
struct fc_frame_header *fc_hdr;
|
||||
@@ -988,6 +997,7 @@ dropit:
|
||||
/* We assume a rcv'ed cmd ALWAYs fits into 1 buffer */
|
||||
lpfc_nvmet_rq_post(phba, NULL, &nvmebuf->hbuf);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user