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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ struct lpfc_dmabuf {

struct lpfc_nvmet_ctxbuf {
	struct list_head list;
	struct lpfc_nvmet_rcv_ctx *context;
	struct lpfc_async_xchg_ctx *context;
	struct lpfc_iocbq *iocbq;
	struct lpfc_sglq *sglq;
	struct work_struct defer_work;
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ typedef int (*node_filter)(struct lpfc_nodelist *, void *);

struct fc_rport;
struct fc_frame_header;
struct lpfc_nvmet_rcv_ctx;
void lpfc_down_link(struct lpfc_hba *, LPFC_MBOXQ_t *);
void lpfc_sli_read_link_ste(struct lpfc_hba *);
void lpfc_dump_mem(struct lpfc_hba *, LPFC_MBOXQ_t *, uint16_t, uint16_t);
+1 −1
Original line number Diff line number Diff line
@@ -1032,7 +1032,7 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size)
{
	struct lpfc_hba   *phba = vport->phba;
	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 lpfc_fc4_ctrl_stat *cstat;
	struct lpfc_nvme_lport *lport;
+1 −1
Original line number Diff line number Diff line
@@ -1029,7 +1029,7 @@ static int
lpfc_hba_down_post_s4(struct lpfc_hba *phba)
{
	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;
	LIST_HEAD(aborts);
	LIST_HEAD(nvme_aborts);
+4 −3
Original line number Diff line number Diff line
@@ -162,13 +162,14 @@ struct lpfc_nvmet_ctx_info {
#define lpfc_get_ctx_list(phba, cpu, mrq)  \
	(phba->sli4_hba.nvmet_ctx_info + ((cpu * phba->cfg_nvmet_mrq) + mrq))

struct lpfc_nvmet_rcv_ctx {
struct lpfc_async_xchg_ctx {
	union {
		struct nvmefc_ls_rsp ls_rsp;
		struct nvmefc_tgt_fcp_req fcp_req;
	} ctx;
	} hdlrctx;
	struct list_head list;
	struct lpfc_hba *phba;
	struct nvmefc_ls_req *ls_req;
	struct nvmefc_ls_rsp ls_rsp;
	struct lpfc_iocbq *wqeq;
	struct lpfc_iocbq *abort_wqeq;
	spinlock_t ctxlock; /* protect flag access */
Loading