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()
1444 struct lpfc_nvmet_ctxbuf *ctx_buf, *next_ctx_buf; in __lpfc_nvmet_clean_io_for_cpu() local
1448 list_for_each_entry_safe(ctx_buf, next_ctx_buf, in __lpfc_nvmet_clean_io_for_cpu()
1451 list_del_init(&ctx_buf->list); in __lpfc_nvmet_clean_io_for_cpu()
1455 __lpfc_clear_active_sglq(phba, ctx_buf->sglq->sli4_lxritag); in __lpfc_nvmet_clean_io_for_cpu()
1458 ctx_buf->sglq->state = SGL_FREED; in __lpfc_nvmet_clean_io_for_cpu()
1459 ctx_buf->sglq->ndlp = NULL; in __lpfc_nvmet_clean_io_for_cpu()
1462 list_add_tail(&ctx_buf->sglq->list, in __lpfc_nvmet_clean_io_for_cpu()
1466 lpfc_sli_release_iocbq(phba, ctx_buf->iocbq); in __lpfc_nvmet_clean_io_for_cpu()
1467 kfree(ctx_buf->context); in __lpfc_nvmet_clean_io_for_cpu()
1497 struct lpfc_nvmet_ctxbuf *ctx_buf; in lpfc_nvmet_setup_io_context() local
1568 ctx_buf = kzalloc(sizeof(*ctx_buf), GFP_KERNEL); in lpfc_nvmet_setup_io_context()
1569 if (!ctx_buf) { in lpfc_nvmet_setup_io_context()
1575 ctx_buf->context = kzalloc(sizeof(*ctx_buf->context), in lpfc_nvmet_setup_io_context()
1577 if (!ctx_buf->context) { in lpfc_nvmet_setup_io_context()
1578 kfree(ctx_buf); in lpfc_nvmet_setup_io_context()
1584 ctx_buf->context->ctxbuf = ctx_buf; in lpfc_nvmet_setup_io_context()
1585 ctx_buf->context->state = LPFC_NVME_STE_FREE; in lpfc_nvmet_setup_io_context()
1587 ctx_buf->iocbq = lpfc_sli_get_iocbq(phba); in lpfc_nvmet_setup_io_context()
1588 if (!ctx_buf->iocbq) { in lpfc_nvmet_setup_io_context()
1589 kfree(ctx_buf->context); in lpfc_nvmet_setup_io_context()
1590 kfree(ctx_buf); in lpfc_nvmet_setup_io_context()
1595 ctx_buf->iocbq->cmd_flag = LPFC_IO_NVMET; in lpfc_nvmet_setup_io_context()
1596 nvmewqe = ctx_buf->iocbq; in lpfc_nvmet_setup_io_context()
1602 ctx_buf->iocbq->cmd_dmabuf = NULL; in lpfc_nvmet_setup_io_context()
1604 ctx_buf->sglq = __lpfc_sli_get_nvmet_sglq(phba, ctx_buf->iocbq); in lpfc_nvmet_setup_io_context()
1606 if (!ctx_buf->sglq) { in lpfc_nvmet_setup_io_context()
1607 lpfc_sli_release_iocbq(phba, ctx_buf->iocbq); in lpfc_nvmet_setup_io_context()
1608 kfree(ctx_buf->context); in lpfc_nvmet_setup_io_context()
1609 kfree(ctx_buf); in lpfc_nvmet_setup_io_context()
1614 INIT_WORK(&ctx_buf->defer_work, lpfc_nvmet_fcp_rqst_defer_work); in lpfc_nvmet_setup_io_context()
1623 list_add_tail(&ctx_buf->list, &infop->nvmet_ctx_list); in lpfc_nvmet_setup_io_context()
2192 lpfc_nvmet_process_rcv_fcp_req(struct lpfc_nvmet_ctxbuf *ctx_buf) in lpfc_nvmet_process_rcv_fcp_req() argument
2195 struct lpfc_async_xchg_ctx *ctxp = ctx_buf->context; in lpfc_nvmet_process_rcv_fcp_req()
2300 struct lpfc_nvmet_ctxbuf *ctx_buf = in lpfc_nvmet_fcp_rqst_defer_work() local
2303 lpfc_nvmet_process_rcv_fcp_req(ctx_buf); in lpfc_nvmet_fcp_rqst_defer_work()
2312 struct lpfc_nvmet_ctxbuf *ctx_buf = NULL; in lpfc_nvmet_replenish_context() local
2349 ctx_buf, struct lpfc_nvmet_ctxbuf, in lpfc_nvmet_replenish_context()
2351 return ctx_buf; in lpfc_nvmet_replenish_context()
2389 struct lpfc_nvmet_ctxbuf *ctx_buf; in lpfc_nvmet_unsol_fcp_buffer() local
2398 ctx_buf = NULL; in lpfc_nvmet_unsol_fcp_buffer()
2419 ctx_buf, struct lpfc_nvmet_ctxbuf, list); in lpfc_nvmet_unsol_fcp_buffer()
2422 ctx_buf = lpfc_nvmet_replenish_context(phba, current_infop); in lpfc_nvmet_unsol_fcp_buffer()
2446 if (!ctx_buf) { in lpfc_nvmet_unsol_fcp_buffer()
2468 ctxp = (struct lpfc_async_xchg_ctx *)ctx_buf->context; in lpfc_nvmet_unsol_fcp_buffer()
2487 ctxp->ctxbuf = ctx_buf; in lpfc_nvmet_unsol_fcp_buffer()
2509 lpfc_nvmet_process_rcv_fcp_req(ctx_buf); in lpfc_nvmet_unsol_fcp_buffer()
2513 if (!queue_work(phba->wq, &ctx_buf->defer_work)) { in lpfc_nvmet_unsol_fcp_buffer()