Lines Matching refs:rport

243 	struct fcloop_rport *rport;  member
329 struct fcloop_rport *rport = in fcloop_rport_lsrqst_work() local
333 spin_lock(&rport->lock); in fcloop_rport_lsrqst_work()
335 tls_req = list_first_entry_or_null(&rport->ls_list, in fcloop_rport_lsrqst_work()
341 spin_unlock(&rport->lock); in fcloop_rport_lsrqst_work()
350 spin_lock(&rport->lock); in fcloop_rport_lsrqst_work()
352 spin_unlock(&rport->lock); in fcloop_rport_lsrqst_work()
360 struct fcloop_rport *rport = remoteport->private; in fcloop_h2t_ls_req() local
370 if (!rport->targetport) { in fcloop_h2t_ls_req()
372 spin_lock(&rport->lock); in fcloop_h2t_ls_req()
373 list_add_tail(&tls_req->ls_list, &rport->ls_list); in fcloop_h2t_ls_req()
374 spin_unlock(&rport->lock); in fcloop_h2t_ls_req()
375 queue_work(nvmet_wq, &rport->ls_work); in fcloop_h2t_ls_req()
380 ret = nvmet_fc_rcv_ls_req(rport->targetport, rport, in fcloop_h2t_ls_req()
395 struct fcloop_rport *rport; in fcloop_h2t_xmt_ls_rsp() local
408 rport = remoteport->private; in fcloop_h2t_xmt_ls_rsp()
409 spin_lock(&rport->lock); in fcloop_h2t_xmt_ls_rsp()
410 list_add_tail(&tls_req->ls_list, &rport->ls_list); in fcloop_h2t_xmt_ls_rsp()
411 spin_unlock(&rport->lock); in fcloop_h2t_xmt_ls_rsp()
412 queue_work(nvmet_wq, &rport->ls_work); in fcloop_h2t_xmt_ls_rsp()
492 struct fcloop_rport *rport = remoteport->private; in fcloop_t2h_xmt_ls_rsp() local
493 struct nvmet_fc_target_port *targetport = rport->targetport; in fcloop_t2h_xmt_ls_rsp()
533 struct fcloop_rport *rport = hosthandle; in fcloop_t2h_host_traddr() local
535 *wwnn = rport->lport->localport->node_name; in fcloop_t2h_host_traddr()
536 *wwpn = rport->lport->localport->port_name; in fcloop_t2h_host_traddr()
761 struct fcloop_rport *rport = remoteport->private; in fcloop_fcp_req() local
765 if (!rport->targetport) in fcloop_fcp_req()
777 tfcp_req->tport = rport->targetport->private; in fcloop_fcp_req()
1100 struct fcloop_rport *rport = remoteport->private; in fcloop_remoteport_delete() local
1104 flush_work(&rport->ls_work); in fcloop_remoteport_delete()
1107 if (!test_and_set_bit(PORT_DELETED, &rport->flags)) in fcloop_remoteport_delete()
1109 rport->nport->rport = NULL; in fcloop_remoteport_delete()
1113 fcloop_nport_put(rport->nport); in fcloop_remoteport_delete()
1386 if ((remoteport && nport->rport) || in fcloop_alloc_nport()
1432 struct fcloop_rport *rport; in fcloop_create_remote_port() local
1454 rport = remoteport->private; in fcloop_create_remote_port()
1455 rport->remoteport = remoteport; in fcloop_create_remote_port()
1456 rport->targetport = (nport->tport) ? nport->tport->targetport : NULL; in fcloop_create_remote_port()
1461 rport->nport = nport; in fcloop_create_remote_port()
1462 rport->lport = nport->lport; in fcloop_create_remote_port()
1463 nport->rport = rport; in fcloop_create_remote_port()
1464 rport->flags = 0; in fcloop_create_remote_port()
1465 spin_lock_init(&rport->lock); in fcloop_create_remote_port()
1466 INIT_WORK(&rport->ls_work, fcloop_rport_lsrqst_work); in fcloop_create_remote_port()
1467 INIT_LIST_HEAD(&rport->ls_list); in fcloop_create_remote_port()
1476 struct fcloop_rport *rport = nport->rport; in __unlink_remote_port() local
1480 if (rport && nport->tport) in __unlink_remote_port()
1482 nport->rport = NULL; in __unlink_remote_port()
1484 return rport; in __unlink_remote_port()
1488 __remoteport_unreg(struct fcloop_nport *nport, struct fcloop_rport *rport) in __remoteport_unreg() argument
1490 return nvme_fc_unregister_remoteport(rport->remoteport); in __remoteport_unreg()
1498 struct fcloop_rport *rport; in fcloop_delete_remote_port() local
1512 rport = __unlink_remote_port(nport); in fcloop_delete_remote_port()
1515 if (!rport) { in fcloop_delete_remote_port()
1520 ret = __remoteport_unreg(nport, rport); in fcloop_delete_remote_port()
1556 tport->remoteport = (nport->rport) ? nport->rport->remoteport : NULL; in fcloop_create_target_port()
1557 if (nport->rport) in fcloop_create_target_port()
1558 nport->rport->targetport = targetport; in fcloop_create_target_port()
1578 if (tport && nport->rport) in __unlink_target_port()
1579 nport->rport->targetport = NULL; in __unlink_target_port()
1729 struct fcloop_rport *rport; in fcloop_exit() local
1742 rport = __unlink_remote_port(nport); in fcloop_exit()
1753 if (rport) { in fcloop_exit()
1754 ret = __remoteport_unreg(nport, rport); in fcloop_exit()