FreeBSD/sys/dev/isci/scil/scic_sds_remote_node_table.c
/**
 * This method will allocate three consecutive remote node context entries. If
 * there are no remaining triple entries the function will return a failure.
 *
 * @param[in] remote_node_table This is the remote node table from which to
 *       allocate the remote node entries.
 * @param[in] group_table_index THis is the group table index which must equal
 *       two (2) for this operation.
 *
 * @return The remote node index that represents three consecutive remote node
 *         entries or an invalid remote node context if none can be found.
 */
This method will allocate three consecutive remote node context entries. If
there are no remaining triple entries the function will return a failure.

@param[in] remote_node_table This is the remote node table from which to
allocate the remote node entries.
@param[in] group_table_index THis is the group table index which must equal
two (2) for this operation.

@return The remote node index that represents three consecutive remote node
entries or an invalid remote node context if none can be found.
This method will allocate three consecutive remote node context entries . If there are no remaining triple entries the function will return a failure . @param [ in ] remote_node_table This is the remote node table from which to allocate the remote node entries . @param [ in ] group_table_index THis is the group table index which must equal two ( 2 ) for this operation . @return The remote node index that represents three consecutive remote node entries or an invalid remote node context if none can be found .
static
U16 scic_sds_remote_node_table_allocate_triple_remote_node(
   SCIC_REMOTE_NODE_TABLE_T * remote_node_table,
   U32                        group_table_index
)
{
   U32 group_index;
   U16 remote_node_index = SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX;
   group_index = scic_sds_remote_node_table_get_group_index(
                                             remote_node_table, group_table_index);
   if (group_index != SCIC_SDS_REMOTE_NODE_TABLE_INVALID_INDEX)
   {
      remote_node_index = (U16) group_index * SCU_STP_REMOTE_NODE_COUNT;
      scic_sds_remote_node_table_clear_group_index(
         remote_node_table, group_table_index, group_index
      );
      scic_sds_remote_node_table_clear_group(
         remote_node_table, group_index
      );
   }
   return remote_node_index;
}
static U16 scic_sds_remote_node_table_allocate_triple_remote_node ( SCIC_REMOTE_NODE_TABLE_T * remote_node_table , U32 group_table_index ) { U32 group_index ; U16 remote_node_index = SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX ; group_index = scic_sds_remote_node_table_get_group_index ( remote_node_table , group_table_index ) ; if ( group_index != SCIC_SDS_REMOTE_NODE_TABLE_INVALID_INDEX ) { remote_node_index = ( U16 ) group_index * SCU_STP_REMOTE_NODE_COUNT ; scic_sds_remote_node_table_clear_group_index ( remote_node_table , group_table_index , group_index ) ; scic_sds_remote_node_table_clear_group ( remote_node_table , group_index ) ; } return remote_node_index ; }
This method will allocate three consecutive remote node context entries.
This method will allocate three consecutive remote node context entries .