Lines Matching refs:lsop

766 	struct nvmefc_ls_req_op *lsop;  in nvme_fc_abort_lsops()  local
772 list_for_each_entry(lsop, &rport->ls_req_list, lsreq_list) { in nvme_fc_abort_lsops()
773 if (!(lsop->flags & FCOP_FLAGS_TERMIO)) { in nvme_fc_abort_lsops()
774 lsop->flags |= FCOP_FLAGS_TERMIO; in nvme_fc_abort_lsops()
778 &lsop->ls_req); in nvme_fc_abort_lsops()
1036 __nvme_fc_finish_ls_req(struct nvmefc_ls_req_op *lsop) in __nvme_fc_finish_ls_req() argument
1038 struct nvme_fc_rport *rport = lsop->rport; in __nvme_fc_finish_ls_req()
1039 struct nvmefc_ls_req *lsreq = &lsop->ls_req; in __nvme_fc_finish_ls_req()
1044 if (!lsop->req_queued) { in __nvme_fc_finish_ls_req()
1049 list_del(&lsop->lsreq_list); in __nvme_fc_finish_ls_req()
1051 lsop->req_queued = false; in __nvme_fc_finish_ls_req()
1064 struct nvmefc_ls_req_op *lsop, in __nvme_fc_send_ls_req() argument
1067 struct nvmefc_ls_req *lsreq = &lsop->ls_req; in __nvme_fc_send_ls_req()
1078 lsop->rport = rport; in __nvme_fc_send_ls_req()
1079 lsop->req_queued = false; in __nvme_fc_send_ls_req()
1080 INIT_LIST_HEAD(&lsop->lsreq_list); in __nvme_fc_send_ls_req()
1081 init_completion(&lsop->ls_done); in __nvme_fc_send_ls_req()
1094 list_add_tail(&lsop->lsreq_list, &rport->ls_req_list); in __nvme_fc_send_ls_req()
1096 lsop->req_queued = true; in __nvme_fc_send_ls_req()
1108 lsop->ls_error = ret; in __nvme_fc_send_ls_req()
1110 lsop->req_queued = false; in __nvme_fc_send_ls_req()
1111 list_del(&lsop->lsreq_list); in __nvme_fc_send_ls_req()
1125 struct nvmefc_ls_req_op *lsop = ls_req_to_lsop(lsreq); in nvme_fc_send_ls_req_done() local
1127 lsop->ls_error = status; in nvme_fc_send_ls_req_done()
1128 complete(&lsop->ls_done); in nvme_fc_send_ls_req_done()
1132 nvme_fc_send_ls_req(struct nvme_fc_rport *rport, struct nvmefc_ls_req_op *lsop) in nvme_fc_send_ls_req() argument
1134 struct nvmefc_ls_req *lsreq = &lsop->ls_req; in nvme_fc_send_ls_req()
1138 ret = __nvme_fc_send_ls_req(rport, lsop, nvme_fc_send_ls_req_done); in nvme_fc_send_ls_req()
1147 wait_for_completion(&lsop->ls_done); in nvme_fc_send_ls_req()
1149 __nvme_fc_finish_ls_req(lsop); in nvme_fc_send_ls_req()
1151 ret = lsop->ls_error; in nvme_fc_send_ls_req()
1166 struct nvmefc_ls_req_op *lsop, in nvme_fc_send_ls_req_async() argument
1171 return __nvme_fc_send_ls_req(rport, lsop, done); in nvme_fc_send_ls_req_async()
1178 struct nvmefc_ls_req_op *lsop; in nvme_fc_connect_admin_queue() local
1185 lsop = kzalloc((sizeof(*lsop) + in nvme_fc_connect_admin_queue()
1188 if (!lsop) { in nvme_fc_connect_admin_queue()
1196 assoc_rqst = (struct fcnvme_ls_cr_assoc_rqst *)&lsop[1]; in nvme_fc_connect_admin_queue()
1198 lsreq = &lsop->ls_req; in nvme_fc_connect_admin_queue()
1224 lsop->queue = queue; in nvme_fc_connect_admin_queue()
1231 ret = nvme_fc_send_ls_req(ctrl->rport, lsop); in nvme_fc_connect_admin_queue()
1282 kfree(lsop); in nvme_fc_connect_admin_queue()
1295 struct nvmefc_ls_req_op *lsop; in nvme_fc_connect_queue() local
1301 lsop = kzalloc((sizeof(*lsop) + in nvme_fc_connect_queue()
1304 if (!lsop) { in nvme_fc_connect_queue()
1312 conn_rqst = (struct fcnvme_ls_cr_conn_rqst *)&lsop[1]; in nvme_fc_connect_queue()
1314 lsreq = &lsop->ls_req; in nvme_fc_connect_queue()
1339 lsop->queue = queue; in nvme_fc_connect_queue()
1346 ret = nvme_fc_send_ls_req(ctrl->rport, lsop); in nvme_fc_connect_queue()
1384 kfree(lsop); in nvme_fc_connect_queue()
1396 struct nvmefc_ls_req_op *lsop = ls_req_to_lsop(lsreq); in nvme_fc_disconnect_assoc_done() local
1398 __nvme_fc_finish_ls_req(lsop); in nvme_fc_disconnect_assoc_done()
1402 kfree(lsop); in nvme_fc_disconnect_assoc_done()
1427 struct nvmefc_ls_req_op *lsop; in nvme_fc_xmt_disconnect_assoc() local
1431 lsop = kzalloc((sizeof(*lsop) + in nvme_fc_xmt_disconnect_assoc()
1434 if (!lsop) { in nvme_fc_xmt_disconnect_assoc()
1442 discon_rqst = (struct fcnvme_ls_disconnect_assoc_rqst *)&lsop[1]; in nvme_fc_xmt_disconnect_assoc()
1444 lsreq = &lsop->ls_req; in nvme_fc_xmt_disconnect_assoc()
1453 ret = nvme_fc_send_ls_req_async(ctrl->rport, lsop, in nvme_fc_xmt_disconnect_assoc()
1456 kfree(lsop); in nvme_fc_xmt_disconnect_assoc()
1462 struct nvmefc_ls_rcv_op *lsop = lsrsp->nvme_fc_private; in nvme_fc_xmt_ls_rsp_done() local
1463 struct nvme_fc_rport *rport = lsop->rport; in nvme_fc_xmt_ls_rsp_done()
1468 list_del(&lsop->lsrcv_list); in nvme_fc_xmt_ls_rsp_done()
1471 fc_dma_sync_single_for_cpu(lport->dev, lsop->rspdma, in nvme_fc_xmt_ls_rsp_done()
1472 sizeof(*lsop->rspbuf), DMA_TO_DEVICE); in nvme_fc_xmt_ls_rsp_done()
1473 fc_dma_unmap_single(lport->dev, lsop->rspdma, in nvme_fc_xmt_ls_rsp_done()
1474 sizeof(*lsop->rspbuf), DMA_TO_DEVICE); in nvme_fc_xmt_ls_rsp_done()
1476 kfree(lsop); in nvme_fc_xmt_ls_rsp_done()
1482 nvme_fc_xmt_ls_rsp(struct nvmefc_ls_rcv_op *lsop) in nvme_fc_xmt_ls_rsp() argument
1484 struct nvme_fc_rport *rport = lsop->rport; in nvme_fc_xmt_ls_rsp()
1486 struct fcnvme_ls_rqst_w0 *w0 = &lsop->rqstbuf->w0; in nvme_fc_xmt_ls_rsp()
1489 fc_dma_sync_single_for_device(lport->dev, lsop->rspdma, in nvme_fc_xmt_ls_rsp()
1490 sizeof(*lsop->rspbuf), DMA_TO_DEVICE); in nvme_fc_xmt_ls_rsp()
1493 lsop->lsrsp); in nvme_fc_xmt_ls_rsp()
1498 nvme_fc_xmt_ls_rsp_done(lsop->lsrsp); in nvme_fc_xmt_ls_rsp()
1505 struct nvmefc_ls_rcv_op *lsop) in nvme_fc_match_disconn_ls() argument
1508 &lsop->rqstbuf->rq_dis_assoc; in nvme_fc_match_disconn_ls()
1522 ctrl->rcv_disconn = lsop; in nvme_fc_match_disconn_ls()
1557 nvme_fc_ls_disconnect_assoc(struct nvmefc_ls_rcv_op *lsop) in nvme_fc_ls_disconnect_assoc() argument
1559 struct nvme_fc_rport *rport = lsop->rport; in nvme_fc_ls_disconnect_assoc()
1561 &lsop->rqstbuf->rq_dis_assoc; in nvme_fc_ls_disconnect_assoc()
1563 &lsop->rspbuf->rsp_dis_assoc; in nvme_fc_ls_disconnect_assoc()
1569 ret = nvmefc_vldt_lsreq_discon_assoc(lsop->rqstdatalen, rqst); in nvme_fc_ls_disconnect_assoc()
1572 ctrl = nvme_fc_match_disconn_ls(rport, lsop); in nvme_fc_ls_disconnect_assoc()
1581 lsop->lsrsp->rsplen = nvme_fc_format_rjt(acc, in nvme_fc_ls_disconnect_assoc()
1592 lsop->lsrsp->rsplen = sizeof(*acc); in nvme_fc_ls_disconnect_assoc()
1620 nvme_fc_handle_ls_rqst(struct nvmefc_ls_rcv_op *lsop) in nvme_fc_handle_ls_rqst() argument
1622 struct fcnvme_ls_rqst_w0 *w0 = &lsop->rqstbuf->w0; in nvme_fc_handle_ls_rqst()
1625 lsop->lsrsp->nvme_fc_private = lsop; in nvme_fc_handle_ls_rqst()
1626 lsop->lsrsp->rspbuf = lsop->rspbuf; in nvme_fc_handle_ls_rqst()
1627 lsop->lsrsp->rspdma = lsop->rspdma; in nvme_fc_handle_ls_rqst()
1628 lsop->lsrsp->done = nvme_fc_xmt_ls_rsp_done; in nvme_fc_handle_ls_rqst()
1630 lsop->lsrsp->rsplen = 0; in nvme_fc_handle_ls_rqst()
1639 ret = nvme_fc_ls_disconnect_assoc(lsop); in nvme_fc_handle_ls_rqst()
1642 lsop->lsrsp->rsplen = nvme_fc_format_rjt(lsop->rspbuf, in nvme_fc_handle_ls_rqst()
1643 sizeof(*lsop->rspbuf), w0->ls_cmd, in nvme_fc_handle_ls_rqst()
1648 lsop->lsrsp->rsplen = nvme_fc_format_rjt(lsop->rspbuf, in nvme_fc_handle_ls_rqst()
1649 sizeof(*lsop->rspbuf), w0->ls_cmd, in nvme_fc_handle_ls_rqst()
1653 lsop->lsrsp->rsplen = nvme_fc_format_rjt(lsop->rspbuf, in nvme_fc_handle_ls_rqst()
1654 sizeof(*lsop->rspbuf), w0->ls_cmd, in nvme_fc_handle_ls_rqst()
1668 struct nvmefc_ls_rcv_op *lsop; in nvme_fc_handle_ls_rqst_work() local
1675 list_for_each_entry(lsop, &rport->ls_rcv_list, lsrcv_list) { in nvme_fc_handle_ls_rqst_work()
1676 if (lsop->handled) in nvme_fc_handle_ls_rqst_work()
1679 lsop->handled = true; in nvme_fc_handle_ls_rqst_work()
1682 sendrsp = nvme_fc_handle_ls_rqst(lsop); in nvme_fc_handle_ls_rqst_work()
1685 w0 = &lsop->rqstbuf->w0; in nvme_fc_handle_ls_rqst_work()
1686 lsop->lsrsp->rsplen = nvme_fc_format_rjt( in nvme_fc_handle_ls_rqst_work()
1687 lsop->rspbuf, in nvme_fc_handle_ls_rqst_work()
1688 sizeof(*lsop->rspbuf), in nvme_fc_handle_ls_rqst_work()
1694 nvme_fc_xmt_ls_rsp(lsop); in nvme_fc_handle_ls_rqst_work()
1727 struct nvmefc_ls_rcv_op *lsop; in nvme_fc_rcv_ls_req() local
1752 lsop = kzalloc(sizeof(*lsop) + in nvme_fc_rcv_ls_req()
1756 if (!lsop) { in nvme_fc_rcv_ls_req()
1764 lsop->rqstbuf = (union nvmefc_ls_requests *)&lsop[1]; in nvme_fc_rcv_ls_req()
1765 lsop->rspbuf = (union nvmefc_ls_responses *)&lsop->rqstbuf[1]; in nvme_fc_rcv_ls_req()
1767 lsop->rspdma = fc_dma_map_single(lport->dev, lsop->rspbuf, in nvme_fc_rcv_ls_req()
1768 sizeof(*lsop->rspbuf), in nvme_fc_rcv_ls_req()
1770 if (fc_dma_mapping_error(lport->dev, lsop->rspdma)) { in nvme_fc_rcv_ls_req()
1779 lsop->rport = rport; in nvme_fc_rcv_ls_req()
1780 lsop->lsrsp = lsrsp; in nvme_fc_rcv_ls_req()
1782 memcpy(lsop->rqstbuf, lsreqbuf, lsreqbuf_len); in nvme_fc_rcv_ls_req()
1783 lsop->rqstdatalen = lsreqbuf_len; in nvme_fc_rcv_ls_req()
1791 list_add_tail(&lsop->lsrcv_list, &rport->ls_rcv_list); in nvme_fc_rcv_ls_req()
1799 fc_dma_unmap_single(lport->dev, lsop->rspdma, in nvme_fc_rcv_ls_req()
1800 sizeof(*lsop->rspbuf), DMA_TO_DEVICE); in nvme_fc_rcv_ls_req()
1802 kfree(lsop); in nvme_fc_rcv_ls_req()