Commit 7cacae2a authored by James Smart's avatar James Smart Committed by Jens Axboe

lpfc: Refactor nvmet_rcv_ctx to create lpfc_async_xchg_ctx

To support FC-NVME-2 support (actually FC-NVME (rev 1) with Ammendment 1),
both the nvme (host) and nvmet (controller/target) sides will need to be
able to receive LS requests.  Currently, this support is in the nvmet side
only. To prepare for both sides supporting LS receive, rename
lpfc_nvmet_rcv_ctx to lpfc_async_xchg_ctx and commonize the definition.
Signed-off-by: default avatarPaul Ely <paul.ely@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2a1160a0
...@@ -143,7 +143,7 @@ struct lpfc_dmabuf { ...@@ -143,7 +143,7 @@ struct lpfc_dmabuf {
struct lpfc_nvmet_ctxbuf { struct lpfc_nvmet_ctxbuf {
struct list_head list; struct list_head list;
struct lpfc_nvmet_rcv_ctx *context; struct lpfc_async_xchg_ctx *context;
struct lpfc_iocbq *iocbq; struct lpfc_iocbq *iocbq;
struct lpfc_sglq *sglq; struct lpfc_sglq *sglq;
struct work_struct defer_work; struct work_struct defer_work;
......
...@@ -24,7 +24,6 @@ typedef int (*node_filter)(struct lpfc_nodelist *, void *); ...@@ -24,7 +24,6 @@ typedef int (*node_filter)(struct lpfc_nodelist *, void *);
struct fc_rport; struct fc_rport;
struct fc_frame_header; struct fc_frame_header;
struct lpfc_nvmet_rcv_ctx;
void lpfc_down_link(struct lpfc_hba *, LPFC_MBOXQ_t *); void lpfc_down_link(struct lpfc_hba *, LPFC_MBOXQ_t *);
void lpfc_sli_read_link_ste(struct lpfc_hba *); void lpfc_sli_read_link_ste(struct lpfc_hba *);
void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t, uint16_t); void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t, uint16_t);
......
...@@ -1032,7 +1032,7 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size) ...@@ -1032,7 +1032,7 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size)
{ {
struct lpfc_hba *phba = vport->phba; struct lpfc_hba *phba = vport->phba;
struct lpfc_nvmet_tgtport *tgtp; struct lpfc_nvmet_tgtport *tgtp;
struct lpfc_nvmet_rcv_ctx *ctxp, *next_ctxp; struct lpfc_async_xchg_ctx *ctxp, *next_ctxp;
struct nvme_fc_local_port *localport; struct nvme_fc_local_port *localport;
struct lpfc_fc4_ctrl_stat *cstat; struct lpfc_fc4_ctrl_stat *cstat;
struct lpfc_nvme_lport *lport; struct lpfc_nvme_lport *lport;
......
...@@ -1029,7 +1029,7 @@ static int ...@@ -1029,7 +1029,7 @@ static int
lpfc_hba_down_post_s4(struct lpfc_hba *phba) lpfc_hba_down_post_s4(struct lpfc_hba *phba)
{ {
struct lpfc_io_buf *psb, *psb_next; struct lpfc_io_buf *psb, *psb_next;
struct lpfc_nvmet_rcv_ctx *ctxp, *ctxp_next; struct lpfc_async_xchg_ctx *ctxp, *ctxp_next;
struct lpfc_sli4_hdw_queue *qp; struct lpfc_sli4_hdw_queue *qp;
LIST_HEAD(aborts); LIST_HEAD(aborts);
LIST_HEAD(nvme_aborts); LIST_HEAD(nvme_aborts);
......
...@@ -162,13 +162,14 @@ struct lpfc_nvmet_ctx_info { ...@@ -162,13 +162,14 @@ struct lpfc_nvmet_ctx_info {
#define lpfc_get_ctx_list(phba, cpu, mrq) \ #define lpfc_get_ctx_list(phba, cpu, mrq) \
(phba->sli4_hba.nvmet_ctx_info + ((cpu * phba->cfg_nvmet_mrq) + mrq)) (phba->sli4_hba.nvmet_ctx_info + ((cpu * phba->cfg_nvmet_mrq) + mrq))
struct lpfc_nvmet_rcv_ctx { struct lpfc_async_xchg_ctx {
union { union {
struct nvmefc_ls_rsp ls_rsp;
struct nvmefc_tgt_fcp_req fcp_req; struct nvmefc_tgt_fcp_req fcp_req;
} ctx; } hdlrctx;
struct list_head list; struct list_head list;
struct lpfc_hba *phba; struct lpfc_hba *phba;
struct nvmefc_ls_req *ls_req;
struct nvmefc_ls_rsp ls_rsp;
struct lpfc_iocbq *wqeq; struct lpfc_iocbq *wqeq;
struct lpfc_iocbq *abort_wqeq; struct lpfc_iocbq *abort_wqeq;
spinlock_t ctxlock; /* protect flag access */ spinlock_t ctxlock; /* protect flag access */
......
This diff is collapsed.
...@@ -19888,7 +19888,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp, ...@@ -19888,7 +19888,7 @@ lpfc_sli4_issue_wqe(struct lpfc_hba *phba, struct lpfc_sli4_hdw_queue *qp,
struct lpfc_iocbq *pwqe) struct lpfc_iocbq *pwqe)
{ {
union lpfc_wqe128 *wqe = &pwqe->wqe; union lpfc_wqe128 *wqe = &pwqe->wqe;
struct lpfc_nvmet_rcv_ctx *ctxp; struct lpfc_async_xchg_ctx *ctxp;
struct lpfc_queue *wq; struct lpfc_queue *wq;
struct lpfc_sglq *sglq; struct lpfc_sglq *sglq;
struct lpfc_sli_ring *pring; struct lpfc_sli_ring *pring;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment