summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_nvme.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2020-03-31 19:50:06 +0300
committerJens Axboe <axboe@kernel.dk>2020-05-10 01:18:34 +0300
commit6514b25d3fba0610cd6c42aa36e34937bed0e4d8 (patch)
tree1dca6f5dcce0315df52873c93c5171107ee24868 /drivers/scsi/lpfc/lpfc_nvme.h
parent3a8070c567aaaa6038b52113ce01527992604c40 (diff)
downloadlinux-6514b25d3fba0610cd6c42aa36e34937bed0e4d8.tar.xz
lpfc: Refactor Send LS Request support
Currently, the ability to send an NVME LS request is limited to the nvme (host) side of the driver. In preparation of both the nvme and nvmet sides support Send LS Request, rework the existing send ls_req and ls_req completion routines such that there is common code that can be used by both sides. Signed-off-by: Paul Ely <paul.ely@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_nvme.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_nvme.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_nvme.h b/drivers/scsi/lpfc/lpfc_nvme.h
index 10e8d868608e..6f8d44aa47b2 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.h
+++ b/drivers/scsi/lpfc/lpfc_nvme.h
@@ -79,6 +79,12 @@ struct lpfc_nvme_fcpreq_priv {
struct lpfc_io_buf *nvme_buf;
};
+/*
+ * set NVME LS request timeouts to 30s. It is larger than the 2*R_A_TOV
+ * set by the spec, which appears to have issues with some devices.
+ */
+#define LPFC_NVME_LS_TIMEOUT 30
+
#define LPFC_NVMET_DEFAULT_SEGS (64 + 1) /* 256K IOs */
#define LPFC_NVMET_RQE_MIN_POST 128
@@ -224,6 +230,13 @@ struct lpfc_async_xchg_ctx {
/* routines found in lpfc_nvme.c */
+int __lpfc_nvme_ls_req(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
+ struct nvmefc_ls_req *pnvme_lsreq,
+ void (*gen_req_cmp)(struct lpfc_hba *phba,
+ struct lpfc_iocbq *cmdwqe,
+ struct lpfc_wcqe_complete *wcqe));
+void __lpfc_nvme_ls_req_cmp(struct lpfc_hba *phba, struct lpfc_vport *vport,
+ struct lpfc_iocbq *cmdwqe, struct lpfc_wcqe_complete *wcqe);
/* routines found in lpfc_nvmet.c */
int lpfc_nvme_unsol_ls_issue_abort(struct lpfc_hba *phba,