Lines Matching refs:ctx_buf
70 static void lpfc_nvmet_process_rcv_fcp_req(struct lpfc_nvmet_ctxbuf *ctx_buf);
386 lpfc_nvmet_ctxbuf_post(struct lpfc_hba *phba, struct lpfc_nvmet_ctxbuf *ctx_buf) in lpfc_nvmet_ctxbuf_post() argument
389 struct lpfc_async_xchg_ctx *ctxp = ctx_buf->context; in lpfc_nvmet_ctxbuf_post()
441 ctxp = (struct lpfc_async_xchg_ctx *)ctx_buf->context; in lpfc_nvmet_ctxbuf_post()
451 ctxp->ctxbuf = ctx_buf; in lpfc_nvmet_ctxbuf_post()
476 if (!queue_work(phba->wq, &ctx_buf->defer_work)) { in lpfc_nvmet_ctxbuf_post()
506 list_add_tail(&ctx_buf->list, &infop->nvmet_ctx_list); in lpfc_nvmet_ctxbuf_post()
1433 struct lpfc_nvmet_ctxbuf *ctx_buf, *next_ctx_buf; in __lpfc_nvmet_clean_io_for_cpu() local
1437 list_for_each_entry_safe(ctx_buf, next_ctx_buf, in __lpfc_nvmet_clean_io_for_cpu()
1440 list_del_init(&ctx_buf->list); in __lpfc_nvmet_clean_io_for_cpu()
1444 __lpfc_clear_active_sglq(phba, ctx_buf->sglq->sli4_lxritag); in __lpfc_nvmet_clean_io_for_cpu()
1447 ctx_buf->sglq->state = SGL_FREED; in __lpfc_nvmet_clean_io_for_cpu()
1448 ctx_buf->sglq->ndlp = NULL; in __lpfc_nvmet_clean_io_for_cpu()
1451 list_add_tail(&ctx_buf->sglq->list, in __lpfc_nvmet_clean_io_for_cpu()
1455 lpfc_sli_release_iocbq(phba, ctx_buf->iocbq); in __lpfc_nvmet_clean_io_for_cpu()
1456 kfree(ctx_buf->context); in __lpfc_nvmet_clean_io_for_cpu()
1486 struct lpfc_nvmet_ctxbuf *ctx_buf; in lpfc_nvmet_setup_io_context() local
1557 ctx_buf = kzalloc(sizeof(*ctx_buf), GFP_KERNEL); in lpfc_nvmet_setup_io_context()
1558 if (!ctx_buf) { in lpfc_nvmet_setup_io_context()
1564 ctx_buf->context = kzalloc(sizeof(*ctx_buf->context), in lpfc_nvmet_setup_io_context()
1566 if (!ctx_buf->context) { in lpfc_nvmet_setup_io_context()
1567 kfree(ctx_buf); in lpfc_nvmet_setup_io_context()
1573 ctx_buf->context->ctxbuf = ctx_buf; in lpfc_nvmet_setup_io_context()
1574 ctx_buf->context->state = LPFC_NVME_STE_FREE; in lpfc_nvmet_setup_io_context()
1576 ctx_buf->iocbq = lpfc_sli_get_iocbq(phba); in lpfc_nvmet_setup_io_context()
1577 if (!ctx_buf->iocbq) { in lpfc_nvmet_setup_io_context()
1578 kfree(ctx_buf->context); in lpfc_nvmet_setup_io_context()
1579 kfree(ctx_buf); in lpfc_nvmet_setup_io_context()
1584 ctx_buf->iocbq->cmd_flag = LPFC_IO_NVMET; in lpfc_nvmet_setup_io_context()
1585 nvmewqe = ctx_buf->iocbq; in lpfc_nvmet_setup_io_context()
1591 ctx_buf->iocbq->cmd_dmabuf = NULL; in lpfc_nvmet_setup_io_context()
1593 ctx_buf->sglq = __lpfc_sli_get_nvmet_sglq(phba, ctx_buf->iocbq); in lpfc_nvmet_setup_io_context()
1595 if (!ctx_buf->sglq) { in lpfc_nvmet_setup_io_context()
1596 lpfc_sli_release_iocbq(phba, ctx_buf->iocbq); in lpfc_nvmet_setup_io_context()
1597 kfree(ctx_buf->context); in lpfc_nvmet_setup_io_context()
1598 kfree(ctx_buf); in lpfc_nvmet_setup_io_context()
1603 INIT_WORK(&ctx_buf->defer_work, lpfc_nvmet_fcp_rqst_defer_work); in lpfc_nvmet_setup_io_context()
1612 list_add_tail(&ctx_buf->list, &infop->nvmet_ctx_list); in lpfc_nvmet_setup_io_context()
2179 lpfc_nvmet_process_rcv_fcp_req(struct lpfc_nvmet_ctxbuf *ctx_buf) in lpfc_nvmet_process_rcv_fcp_req() argument
2182 struct lpfc_async_xchg_ctx *ctxp = ctx_buf->context; in lpfc_nvmet_process_rcv_fcp_req()
2287 struct lpfc_nvmet_ctxbuf *ctx_buf = in lpfc_nvmet_fcp_rqst_defer_work() local
2290 lpfc_nvmet_process_rcv_fcp_req(ctx_buf); in lpfc_nvmet_fcp_rqst_defer_work()
2299 struct lpfc_nvmet_ctxbuf *ctx_buf = NULL; in lpfc_nvmet_replenish_context() local
2336 ctx_buf, struct lpfc_nvmet_ctxbuf, in lpfc_nvmet_replenish_context()
2338 return ctx_buf; in lpfc_nvmet_replenish_context()
2376 struct lpfc_nvmet_ctxbuf *ctx_buf; in lpfc_nvmet_unsol_fcp_buffer() local
2385 ctx_buf = NULL; in lpfc_nvmet_unsol_fcp_buffer()
2406 ctx_buf, struct lpfc_nvmet_ctxbuf, list); in lpfc_nvmet_unsol_fcp_buffer()
2409 ctx_buf = lpfc_nvmet_replenish_context(phba, current_infop); in lpfc_nvmet_unsol_fcp_buffer()
2433 if (!ctx_buf) { in lpfc_nvmet_unsol_fcp_buffer()
2455 ctxp = (struct lpfc_async_xchg_ctx *)ctx_buf->context; in lpfc_nvmet_unsol_fcp_buffer()
2474 ctxp->ctxbuf = ctx_buf; in lpfc_nvmet_unsol_fcp_buffer()
2496 lpfc_nvmet_process_rcv_fcp_req(ctx_buf); in lpfc_nvmet_unsol_fcp_buffer()
2500 if (!queue_work(phba->wq, &ctx_buf->defer_work)) { in lpfc_nvmet_unsol_fcp_buffer()