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()
670 struct fcloop_rport *rport = remoteport->private; in fcloop_fcp_req() local
674 if (!rport->targetport) in fcloop_fcp_req()
686 tfcp_req->tport = rport->targetport->private; in fcloop_fcp_req()
980 struct fcloop_rport *rport = remoteport->private; in fcloop_remoteport_delete() local
982 flush_work(&rport->ls_work); in fcloop_remoteport_delete()
983 fcloop_nport_put(rport->nport); in fcloop_remoteport_delete()
1216 if ((remoteport && nport->rport) || in fcloop_alloc_nport()
1258 struct fcloop_rport *rport; in fcloop_create_remote_port() local
1280 rport = remoteport->private; in fcloop_create_remote_port()
1281 rport->remoteport = remoteport; in fcloop_create_remote_port()
1282 rport->targetport = (nport->tport) ? nport->tport->targetport : NULL; in fcloop_create_remote_port()
1287 rport->nport = nport; in fcloop_create_remote_port()
1288 rport->lport = nport->lport; in fcloop_create_remote_port()
1289 nport->rport = rport; in fcloop_create_remote_port()
1290 spin_lock_init(&rport->lock); in fcloop_create_remote_port()
1291 INIT_WORK(&rport->ls_work, fcloop_rport_lsrqst_work); in fcloop_create_remote_port()
1292 INIT_LIST_HEAD(&rport->ls_list); in fcloop_create_remote_port()
1301 struct fcloop_rport *rport = nport->rport; in __unlink_remote_port() local
1303 if (rport && nport->tport) in __unlink_remote_port()
1305 nport->rport = NULL; in __unlink_remote_port()
1307 return rport; in __unlink_remote_port()
1311 __remoteport_unreg(struct fcloop_nport *nport, struct fcloop_rport *rport) in __remoteport_unreg() argument
1313 if (!rport) in __remoteport_unreg()
1316 return nvme_fc_unregister_remoteport(rport->remoteport); in __remoteport_unreg()
1324 static struct fcloop_rport *rport; in fcloop_delete_remote_port() local
1337 tmpport->port_name == portname && tmpport->rport) { in fcloop_delete_remote_port()
1339 rport = __unlink_remote_port(nport); in fcloop_delete_remote_port()
1349 ret = __remoteport_unreg(nport, rport); in fcloop_delete_remote_port()
1382 tport->remoteport = (nport->rport) ? nport->rport->remoteport : NULL; in fcloop_create_target_port()
1383 if (nport->rport) in fcloop_create_target_port()
1384 nport->rport->targetport = targetport; in fcloop_create_target_port()
1401 if (tport && nport->rport) in __unlink_target_port()
1402 nport->rport->targetport = NULL; in __unlink_target_port()
1517 struct fcloop_rport *rport; in fcloop_exit() local
1530 rport = __unlink_remote_port(nport); in fcloop_exit()
1538 ret = __remoteport_unreg(nport, rport); in fcloop_exit()