Lines Matching refs:rport
238 struct fcloop_rport *rport; member
321 struct fcloop_rport *rport = in fcloop_rport_lsrqst_work() local
325 spin_lock(&rport->lock); in fcloop_rport_lsrqst_work()
327 tls_req = list_first_entry_or_null(&rport->ls_list, in fcloop_rport_lsrqst_work()
333 spin_unlock(&rport->lock); in fcloop_rport_lsrqst_work()
341 spin_lock(&rport->lock); in fcloop_rport_lsrqst_work()
343 spin_unlock(&rport->lock); in fcloop_rport_lsrqst_work()
352 struct fcloop_rport *rport = remoteport->private; in fcloop_h2t_ls_req() local
358 if (!rport->targetport) { in fcloop_h2t_ls_req()
360 spin_lock(&rport->lock); in fcloop_h2t_ls_req()
361 list_add_tail(&rport->ls_list, &tls_req->ls_list); in fcloop_h2t_ls_req()
362 spin_unlock(&rport->lock); in fcloop_h2t_ls_req()
363 schedule_work(&rport->ls_work); in fcloop_h2t_ls_req()
368 ret = nvmet_fc_rcv_ls_req(rport->targetport, rport, in fcloop_h2t_ls_req()
383 struct fcloop_rport *rport; in fcloop_h2t_xmt_ls_rsp() local
392 rport = remoteport->private; in fcloop_h2t_xmt_ls_rsp()
393 spin_lock(&rport->lock); in fcloop_h2t_xmt_ls_rsp()
394 list_add_tail(&rport->ls_list, &tls_req->ls_list); in fcloop_h2t_xmt_ls_rsp()
395 spin_unlock(&rport->lock); in fcloop_h2t_xmt_ls_rsp()
396 schedule_work(&rport->ls_work); in fcloop_h2t_xmt_ls_rsp()
469 struct fcloop_rport *rport = remoteport->private; in fcloop_t2h_xmt_ls_rsp() local
470 struct nvmet_fc_target_port *targetport = rport->targetport; in fcloop_t2h_xmt_ls_rsp()
673 struct fcloop_rport *rport = remoteport->private; in fcloop_fcp_req() local
677 if (!rport->targetport) in fcloop_fcp_req()
689 tfcp_req->tport = rport->targetport->private; in fcloop_fcp_req()
986 struct fcloop_rport *rport = remoteport->private; in fcloop_remoteport_delete() local
988 flush_work(&rport->ls_work); in fcloop_remoteport_delete()
989 fcloop_nport_put(rport->nport); in fcloop_remoteport_delete()
1222 if ((remoteport && nport->rport) || in fcloop_alloc_nport()
1264 struct fcloop_rport *rport; in fcloop_create_remote_port() local
1286 rport = remoteport->private; in fcloop_create_remote_port()
1287 rport->remoteport = remoteport; in fcloop_create_remote_port()
1288 rport->targetport = (nport->tport) ? nport->tport->targetport : NULL; in fcloop_create_remote_port()
1293 rport->nport = nport; in fcloop_create_remote_port()
1294 rport->lport = nport->lport; in fcloop_create_remote_port()
1295 nport->rport = rport; in fcloop_create_remote_port()
1296 spin_lock_init(&rport->lock); in fcloop_create_remote_port()
1297 INIT_WORK(&rport->ls_work, fcloop_rport_lsrqst_work); in fcloop_create_remote_port()
1298 INIT_LIST_HEAD(&rport->ls_list); in fcloop_create_remote_port()
1307 struct fcloop_rport *rport = nport->rport; in __unlink_remote_port() local
1309 if (rport && nport->tport) in __unlink_remote_port()
1311 nport->rport = NULL; in __unlink_remote_port()
1313 return rport; in __unlink_remote_port()
1317 __remoteport_unreg(struct fcloop_nport *nport, struct fcloop_rport *rport) in __remoteport_unreg() argument
1319 if (!rport) in __remoteport_unreg()
1322 return nvme_fc_unregister_remoteport(rport->remoteport); in __remoteport_unreg()
1330 static struct fcloop_rport *rport; in fcloop_delete_remote_port() local
1343 tmpport->port_name == portname && tmpport->rport) { in fcloop_delete_remote_port()
1345 rport = __unlink_remote_port(nport); in fcloop_delete_remote_port()
1355 ret = __remoteport_unreg(nport, rport); in fcloop_delete_remote_port()
1388 tport->remoteport = (nport->rport) ? nport->rport->remoteport : NULL; in fcloop_create_target_port()
1389 if (nport->rport) in fcloop_create_target_port()
1390 nport->rport->targetport = targetport; in fcloop_create_target_port()
1407 if (tport && nport->rport) in __unlink_target_port()
1408 nport->rport->targetport = NULL; in __unlink_target_port()
1523 struct fcloop_rport *rport; in fcloop_exit() local
1536 rport = __unlink_remote_port(nport); in fcloop_exit()
1544 ret = __remoteport_unreg(nport, rport); in fcloop_exit()