• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/ocs_fc/

Lines Matching defs:rnode

2402 		hw->callback.rnode = func;
2403 hw->args.rnode = arg;
2926 * @param rnode Allocated remote node object to initialize.
2933 ocs_hw_node_alloc(ocs_hw_t *hw, ocs_remote_node_t *rnode, uint32_t fc_addr,
2937 if (UINT32_MAX != rnode->indicator) {
2939 fc_addr, rnode->indicator);
2952 rnode->sport = NULL;
2954 if (sli_resource_alloc(&hw->sli, SLI_RSRC_FCOE_RPI, &rnode->indicator, &rnode->index)) {
2960 rnode->fc_id = fc_addr;
2961 rnode->sport = sport;
2971 * @param rnode Allocated remote node object to initialize.
2977 ocs_hw_node_attach(ocs_hw_t *hw, ocs_remote_node_t *rnode, ocs_dma_t *sparms)
2983 if (!hw || !rnode || !sparms) {
2984 ocs_log_err(NULL, "bad parameter(s) hw=%p rnode=%p sparms=%p\n",
2985 hw, rnode, sparms);
3007 if (rnode->index == UINT32_MAX) {
3008 ocs_log_err(NULL, "bad parameter rnode->index invalid\n");
3012 count = ocs_atomic_add_return(&hw->rpi_ref[rnode->index].rpi_count, 1);
3023 rnode->node_group = TRUE;
3024 rnode->attached = ocs_atomic_read(&hw->rpi_ref[rnode->index].rpi_attached);
3025 rc = rnode->attached ? OCS_HW_RTN_SUCCESS_SYNC : OCS_HW_RTN_SUCCESS;
3028 rnode->node_group = FALSE;
3031 if (sli_cmd_reg_rpi(&hw->sli, buf, SLI4_BMBX_SIZE, rnode->fc_id,
3032 rnode->indicator, rnode->sport->indicator,
3035 ocs_hw_cb_node_attach, rnode);
3041 ocs_atomic_sub_return(&hw->rpi_ref[rnode->index].rpi_count, 1);
3055 * @param rnode Remote node object to free.
3060 ocs_hw_node_free_resources(ocs_hw_t *hw, ocs_remote_node_t *rnode)
3064 if (!hw || !rnode) {
3065 ocs_log_err(NULL, "bad parameter(s) hw=%p rnode=%p\n",
3066 hw, rnode);
3070 if (rnode->sport) {
3071 if (!rnode->attached) {
3072 if (rnode->indicator != UINT32_MAX) {
3073 if (sli_resource_free(&hw->sli, SLI_RSRC_FCOE_RPI, rnode->indicator)) {
3075 rnode->indicator, rnode->fc_id);
3078 rnode->node_group = FALSE;
3079 rnode->indicator = UINT32_MAX;
3080 rnode->index = UINT32_MAX;
3081 rnode->free_group = FALSE;
3085 ocs_log_err(hw->os, "Error: rnode is still attached\n");
3098 * @param rnode Remote node object to free.
3103 ocs_hw_node_detach(ocs_hw_t *hw, ocs_remote_node_t *rnode)
3109 if (!hw || !rnode) {
3110 ocs_log_err(NULL, "bad parameter(s) hw=%p rnode=%p\n",
3111 hw, rnode);
3123 index = rnode->index;
3125 if (rnode->sport) {
3129 if (!rnode->attached) {
3145 rnode->node_group = FALSE;
3146 rnode->free_group = TRUE;
3152 fc_id = rnode->fc_id & 0x00ffffff;
3157 if (sli_cmd_unreg_rpi(&hw->sli, buf, SLI4_BMBX_SIZE, rnode->indicator,
3159 rc = ocs_hw_command(hw, buf, OCS_CMD_NOWAIT, ocs_hw_cb_node_free, rnode);
3241 ocs_hw_node_group_attach(ocs_hw_t *hw, ocs_remote_node_group_t *ngroup, ocs_remote_node_t *rnode)
3244 if (!hw || !ngroup || !rnode) {
3245 ocs_log_err(NULL, "bad parameter hw=%p ngroup=%p rnode=%p\n",
3246 hw, ngroup, rnode);
3250 if (rnode->attached) {
3252 rnode->indicator, rnode->fc_id);
3256 if (sli_resource_free(&hw->sli, SLI_RSRC_FCOE_RPI, rnode->indicator)) {
3258 rnode->indicator);
3262 rnode->indicator = ngroup->indicator;
3263 rnode->index = ngroup->index;
3322 io->rnode = NULL;
3748 io->sec_iparam.fcp_tgt.ox_id, io->rnode->indicator, io->rnode,
3759 io->sec_iparam.fcp_tgt.ox_id, io->rnode->indicator, io->rnode,
3816 * @param rnode Destination of data (that is, a remote node).
3826 ocs_remote_node_t *rnode, ocs_hw_io_param_t *iparam,
3833 if (!hw || !io || !rnode || !iparam) {
3834 ocs_log_err(NULL, "bad parm hw=%p io=%p send=%p receive=%p rnode=%p iparam=%p\n",
3835 hw, io, send, receive, rnode, iparam);
3848 io->rnode = rnode;
3880 iparam->els.timeout, io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rnode)) {
3889 rnode, local_flags, UINT32_MAX)) {
3898 rnode, local_flags, iparam->els_sid.s_id)) {
3906 io->reqtag, SLI4_CQ_DEFAULT, rnode, iparam->fc_ct.r_ctl,
3915 io->reqtag, rnode, iparam->fc_ct_rsp.r_ctl,
3940 rnode, UINT32_MAX)) {
3959 rnode, iparam->bls_sid.s_id)) {
3968 SLI4_CQ_DEFAULT, rnode,
4025 * @param rnode Destination of data (that is, a remote node).
4037 uint32_t len, ocs_hw_io_param_t *iparam, ocs_remote_node_t *rnode,
4046 if (!hw || !io || !rnode || !iparam) {
4047 ocs_log_err(NULL, "bad parm hw=%p io=%p iparam=%p rnode=%p\n",
4048 hw, io, iparam, rnode);
4057 rpi = rnode->indicator;
4067 io->rnode = rnode;
4090 io->indicator, io->reqtag, SLI4_CQ_DEFAULT, rpi, rnode,
4104 SLI4_CQ_DEFAULT, rpi, rnode,
4117 rpi, rnode, iparam->fcp_ini.timeout)) {
4199 iparam->fcp_tgt.ox_id, rpi, rnode,
4210 iparam->fcp_tgt.ox_id, rpi, rnode,
4233 iparam->fcp_tgt.ox_id, rpi, rnode,
4269 rpi, rnode,
8769 done(io, io->rnode, len, status, ext, arg);
8850 done(io, io->rnode, len, status, ext, arg);
8859 done(io, io->rnode, len, status, ext, arg);
8932 done(io, io->rnode, len, status, ext, arg);
9359 ocs_remote_node_t *rnode = arg;
9366 ocs_atomic_sub_return(&hw->rpi_ref[rnode->index].rpi_count, 1);
9367 rnode->attached = FALSE;
9368 ocs_atomic_set(&hw->rpi_ref[rnode->index].rpi_attached, 0);
9371 rnode->attached = TRUE;
9372 ocs_atomic_set(&hw->rpi_ref[rnode->index].rpi_attached, 1);
9376 if (hw->callback.rnode != NULL) {
9377 hw->callback.rnode(hw->args.rnode, evt, rnode);
9387 ocs_remote_node_t *rnode = arg;
9402 if (!rnode->attached || ((sli_get_hlm(&hw->sli) == TRUE) && !rnode->node_group) ||
9409 rnode->node_group = FALSE;
9410 rnode->attached = FALSE;
9412 if (ocs_atomic_read(&hw->rpi_ref[rnode->index].rpi_count) == 0) {
9413 ocs_atomic_set(&hw->rpi_ref[rnode->index].rpi_attached, 0);
9419 if (hw->callback.rnode != NULL) {
9420 hw->callback.rnode(hw->args.rnode, evt, rnode);
9454 if (hw->callback.rnode != NULL) {
9455 hw->callback.rnode(hw->args.rnode, evt, NULL);
9744 done(io, io->rnode, 0, SLI4_FC_WCQE_STATUS_SHUTDOWN, 0, arg);
9753 abort_done(io, io->rnode, 0, SLI4_FC_WCQE_STATUS_SHUTDOWN, 0, abort_arg);
12090 * <li>rnode ��� This function is called for remote node events, such as attach status
12468 ocs_log_debug(hw->os, "HW Workaround: use unreg'd RPI if rnode->indicator == 0xFFFF\n");