Lines Matching refs:rnode

2415 		hw->callback.rnode = func;  in ocs_hw_callback()
2416 hw->args.rnode = arg; in ocs_hw_callback()
2946 ocs_hw_node_alloc(ocs_hw_t *hw, ocs_remote_node_t *rnode, uint32_t fc_addr, in ocs_hw_node_alloc() argument
2950 if (UINT32_MAX != rnode->indicator) { in ocs_hw_node_alloc()
2952 fc_addr, rnode->indicator); in ocs_hw_node_alloc()
2965 rnode->sport = NULL; in ocs_hw_node_alloc()
2967 if (sli_resource_alloc(&hw->sli, SLI_RSRC_FCOE_RPI, &rnode->indicator, &rnode->index)) { in ocs_hw_node_alloc()
2973 rnode->fc_id = fc_addr; in ocs_hw_node_alloc()
2974 rnode->sport = sport; in ocs_hw_node_alloc()
2990 ocs_hw_node_attach(ocs_hw_t *hw, ocs_remote_node_t *rnode, ocs_dma_t *sparms) in ocs_hw_node_attach() argument
2996 if (!hw || !rnode || !sparms) { in ocs_hw_node_attach()
2998 hw, rnode, sparms); in ocs_hw_node_attach()
3020 if (rnode->index == UINT32_MAX) { in ocs_hw_node_attach()
3025 count = ocs_atomic_add_return(&hw->rpi_ref[rnode->index].rpi_count, 1); in ocs_hw_node_attach()
3036 rnode->node_group = TRUE; in ocs_hw_node_attach()
3037 rnode->attached = ocs_atomic_read(&hw->rpi_ref[rnode->index].rpi_attached); in ocs_hw_node_attach()
3038 rc = rnode->attached ? OCS_HW_RTN_SUCCESS_SYNC : OCS_HW_RTN_SUCCESS; in ocs_hw_node_attach()
3041 rnode->node_group = FALSE; in ocs_hw_node_attach()
3044 if (sli_cmd_reg_rpi(&hw->sli, buf, SLI4_BMBX_SIZE, rnode->fc_id, in ocs_hw_node_attach()
3045 rnode->indicator, rnode->sport->indicator, in ocs_hw_node_attach()
3048 ocs_hw_cb_node_attach, rnode); in ocs_hw_node_attach()
3054 ocs_atomic_sub_return(&hw->rpi_ref[rnode->index].rpi_count, 1); in ocs_hw_node_attach()
3073 ocs_hw_node_free_resources(ocs_hw_t *hw, ocs_remote_node_t *rnode) in ocs_hw_node_free_resources() argument
3077 if (!hw || !rnode) { in ocs_hw_node_free_resources()
3079 hw, rnode); in ocs_hw_node_free_resources()
3083 if (rnode->sport) { in ocs_hw_node_free_resources()
3084 if (!rnode->attached) { in ocs_hw_node_free_resources()
3085 if (rnode->indicator != UINT32_MAX) { in ocs_hw_node_free_resources()
3086 if (sli_resource_free(&hw->sli, SLI_RSRC_FCOE_RPI, rnode->indicator)) { in ocs_hw_node_free_resources()
3088 rnode->indicator, rnode->fc_id); in ocs_hw_node_free_resources()
3091 rnode->node_group = FALSE; in ocs_hw_node_free_resources()
3092 rnode->indicator = UINT32_MAX; in ocs_hw_node_free_resources()
3093 rnode->index = UINT32_MAX; in ocs_hw_node_free_resources()
3094 rnode->free_group = FALSE; in ocs_hw_node_free_resources()
3116 ocs_hw_node_detach(ocs_hw_t *hw, ocs_remote_node_t *rnode) in ocs_hw_node_detach() argument
3122 if (!hw || !rnode) { in ocs_hw_node_detach()
3124 hw, rnode); in ocs_hw_node_detach()
3136 index = rnode->index; in ocs_hw_node_detach()
3138 if (rnode->sport) { in ocs_hw_node_detach()
3142 if (!rnode->attached) { in ocs_hw_node_detach()
3158 rnode->node_group = FALSE; in ocs_hw_node_detach()
3159 rnode->free_group = TRUE; in ocs_hw_node_detach()
3165 fc_id = rnode->fc_id & 0x00ffffff; in ocs_hw_node_detach()
3170 if (sli_cmd_unreg_rpi(&hw->sli, buf, SLI4_BMBX_SIZE, rnode->indicator, in ocs_hw_node_detach()
3172 rc = ocs_hw_command(hw, buf, OCS_CMD_NOWAIT, ocs_hw_cb_node_free, rnode); in ocs_hw_node_detach()
3254 ocs_hw_node_group_attach(ocs_hw_t *hw, ocs_remote_node_group_t *ngroup, ocs_remote_node_t *rnode) in ocs_hw_node_group_attach() argument
3257 if (!hw || !ngroup || !rnode) { in ocs_hw_node_group_attach()
3259 hw, ngroup, rnode); in ocs_hw_node_group_attach()
3263 if (rnode->attached) { in ocs_hw_node_group_attach()
3265 rnode->indicator, rnode->fc_id); in ocs_hw_node_group_attach()
3269 if (sli_resource_free(&hw->sli, SLI_RSRC_FCOE_RPI, rnode->indicator)) { in ocs_hw_node_group_attach()
3271 rnode->indicator); in ocs_hw_node_group_attach()
3275 rnode->indicator = ngroup->indicator; in ocs_hw_node_group_attach()
3276 rnode->index = ngroup->index; in ocs_hw_node_group_attach()
3335 io->rnode = NULL; in ocs_hw_init_free_io()
3761 io->sec_iparam.fcp_tgt.ox_id, io->rnode->indicator, io->rnode, in ocs_hw_check_sec_hio_list()
3772 io->sec_iparam.fcp_tgt.ox_id, io->rnode->indicator, io->rnode, in ocs_hw_check_sec_hio_list()
3839 ocs_remote_node_t *rnode, ocs_hw_io_param_t *iparam, in ocs_hw_srrs_send() argument
3846 if (!hw || !io || !rnode || !iparam) { in ocs_hw_srrs_send()
3848 hw, io, send, receive, rnode, iparam); in ocs_hw_srrs_send()
3861 io->rnode = rnode; in ocs_hw_srrs_send()
3893 iparam->els.timeout, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rnode)) { in ocs_hw_srrs_send()
3902 rnode, local_flags, UINT32_MAX)) { in ocs_hw_srrs_send()
3911 rnode, local_flags, iparam->els_sid.s_id)) { in ocs_hw_srrs_send()
3919 io->reqtag, SLI4_CQ_DEFAULT, rnode, iparam->fc_ct.r_ctl, in ocs_hw_srrs_send()
3928 io->reqtag, rnode, iparam->fc_ct_rsp.r_ctl, in ocs_hw_srrs_send()
3953 rnode, UINT32_MAX)) { in ocs_hw_srrs_send()
3972 rnode, iparam->bls_sid.s_id)) { in ocs_hw_srrs_send()
3981 SLI4_CQ_DEFAULT, rnode, in ocs_hw_srrs_send()
4050 uint32_t len, ocs_hw_io_param_t *iparam, ocs_remote_node_t *rnode, in ocs_hw_io_send() argument
4060 if (!hw || !io || !rnode || !iparam) { in ocs_hw_io_send()
4062 hw, io, iparam, rnode); in ocs_hw_io_send()
4071 rpi = rnode->indicator; in ocs_hw_io_send()
4081 io->rnode = rnode; in ocs_hw_io_send()
4106 io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rpi, rnode, in ocs_hw_io_send()
4122 SLI4_CQ_DEFAULT, rpi, rnode, in ocs_hw_io_send()
4137 rpi, rnode, timeout)) { in ocs_hw_io_send()
4219 iparam->fcp_tgt.ox_id, rpi, rnode, in ocs_hw_io_send()
4230 iparam->fcp_tgt.ox_id, rpi, rnode, in ocs_hw_io_send()
4253 iparam->fcp_tgt.ox_id, rpi, rnode, in ocs_hw_io_send()
4289 rpi, rnode, in ocs_hw_io_send()
8795 done(io, io->rnode, len, status, ext, arg); in ocs_hw_wq_process_io()
8876 done(io, io->rnode, len, status, ext, arg); in ocs_hw_wq_process_abort()
8885 done(io, io->rnode, len, status, ext, arg); in ocs_hw_wq_process_abort()
8958 done(io, io->rnode, len, status, ext, arg); in ocs_hw_xabt_process()
9385 ocs_remote_node_t *rnode = arg; in ocs_hw_cb_node_attach() local
9392 ocs_atomic_sub_return(&hw->rpi_ref[rnode->index].rpi_count, 1); in ocs_hw_cb_node_attach()
9393 rnode->attached = FALSE; in ocs_hw_cb_node_attach()
9394 ocs_atomic_set(&hw->rpi_ref[rnode->index].rpi_attached, 0); in ocs_hw_cb_node_attach()
9397 rnode->attached = TRUE; in ocs_hw_cb_node_attach()
9398 ocs_atomic_set(&hw->rpi_ref[rnode->index].rpi_attached, 1); in ocs_hw_cb_node_attach()
9402 if (hw->callback.rnode != NULL) { in ocs_hw_cb_node_attach()
9403 hw->callback.rnode(hw->args.rnode, evt, rnode); in ocs_hw_cb_node_attach()
9413 ocs_remote_node_t *rnode = arg; in ocs_hw_cb_node_free() local
9428 if (!rnode->attached || ((sli_get_hlm(&hw->sli) == TRUE) && !rnode->node_group) || in ocs_hw_cb_node_free()
9435 rnode->node_group = FALSE; in ocs_hw_cb_node_free()
9436 rnode->attached = FALSE; in ocs_hw_cb_node_free()
9438 if (ocs_atomic_read(&hw->rpi_ref[rnode->index].rpi_count) == 0) { in ocs_hw_cb_node_free()
9439 ocs_atomic_set(&hw->rpi_ref[rnode->index].rpi_attached, 0); in ocs_hw_cb_node_free()
9445 if (hw->callback.rnode != NULL) { in ocs_hw_cb_node_free()
9446 hw->callback.rnode(hw->args.rnode, evt, rnode); in ocs_hw_cb_node_free()
9480 if (hw->callback.rnode != NULL) { in ocs_hw_cb_node_free_all()
9481 hw->callback.rnode(hw->args.rnode, evt, NULL); in ocs_hw_cb_node_free_all()
9770 done(io, io->rnode, 0, SLI4_FC_WCQE_STATUS_SHUTDOWN, 0, arg); in ocs_hw_io_cancel_cleanup()
9779 abort_done(io, io->rnode, 0, SLI4_FC_WCQE_STATUS_SHUTDOWN, 0, abort_arg); in ocs_hw_io_cancel_cleanup()