FreeBSD/sys/dev/isci/scil/scic_sds_remote_node_context.c
/**
* This method will construct the RNC buffer for this remote device object.
*
* @param[in] this_device The remote device to use to construct the RNC
*       buffer.
* @param[in] rnc The buffer into which the remote device data will be copied.
*
* @return none
*/
This method will construct the RNC buffer for this remote device object.
This method will construct the RNC buffer for this remote device object .
void scic_sds_remote_node_context_construct_buffer(
   SCIC_SDS_REMOTE_NODE_CONTEXT_T * this_rnc
      )
{
   SCU_REMOTE_NODE_CONTEXT_T * rnc;
   SCIC_SDS_CONTROLLER_T     * the_controller;
   the_controller = scic_sds_remote_device_get_controller(this_rnc->device);
   rnc = scic_sds_controller_get_remote_node_context_buffer(
      the_controller, this_rnc->remote_node_index);
   memset(
      rnc,
      0x00,
      sizeof(SCU_REMOTE_NODE_CONTEXT_T)
         * scic_sds_remote_device_node_count(this_rnc->device)
         );
   rnc->ssp.remote_node_index = this_rnc->remote_node_index;
   rnc->ssp.remote_node_port_width = this_rnc->device->device_port_width;
   rnc->ssp.logical_port_index =
      scic_sds_remote_device_get_port_index(this_rnc->device);
   rnc->ssp.remote_sas_address_hi = SCIC_SWAP_DWORD(this_rnc->device->device_address.high);
   rnc->ssp.remote_sas_address_lo = SCIC_SWAP_DWORD(this_rnc->device->device_address.low);
   rnc->ssp.nexus_loss_timer_enable = TRUE;
   rnc->ssp.check_bit               = FALSE;
   rnc->ssp.is_valid                = FALSE;
   rnc->ssp.is_remote_node_context  = TRUE;
   rnc->ssp.function_number         = 0;
   rnc->ssp.arbitration_wait_time = 0;
   if (
      this_rnc->device->target_protocols.u.bits.attached_sata_device
         || this_rnc->device->target_protocols.u.bits.attached_stp_target
         )
   {
      rnc->ssp.connection_occupancy_timeout =
         the_controller->user_parameters.sds1.stp_max_occupancy_timeout;
      rnc->ssp.connection_inactivity_timeout =
         the_controller->user_parameters.sds1.stp_inactivity_timeout;
   }
   else
   {
      rnc->ssp.connection_occupancy_timeout  =
         the_controller->user_parameters.sds1.ssp_max_occupancy_timeout;
      rnc->ssp.connection_inactivity_timeout =
         the_controller->user_parameters.sds1.ssp_inactivity_timeout;
   }
   rnc->ssp.initial_arbitration_wait_time = 0;
   rnc->ssp.oaf_connection_rate = this_rnc->device->connection_rate;
   rnc->ssp.oaf_features = 0;
   rnc->ssp.oaf_source_zone_group = 0;
   rnc->ssp.oaf_more_compatibility_features = 0;
}
void scic_sds_remote_node_context_construct_buffer ( SCIC_SDS_REMOTE_NODE_CONTEXT_T * this_rnc ) { SCU_REMOTE_NODE_CONTEXT_T * rnc ; SCIC_SDS_CONTROLLER_T * the_controller ; the_controller = scic_sds_remote_device_get_controller ( this_rnc -> device ) ; rnc = scic_sds_controller_get_remote_node_context_buffer ( the_controller , this_rnc -> remote_node_index ) ; memset ( rnc , 0x00 , sizeof ( SCU_REMOTE_NODE_CONTEXT_T ) * scic_sds_remote_device_node_count ( this_rnc -> device ) ) ; rnc -> ssp . remote_node_index = this_rnc -> remote_node_index ; rnc -> ssp . remote_node_port_width = this_rnc -> device -> device_port_width ; rnc -> ssp . logical_port_index = scic_sds_remote_device_get_port_index ( this_rnc -> device ) ; rnc -> ssp . remote_sas_address_hi = SCIC_SWAP_DWORD ( this_rnc -> device -> device_address . high ) ; rnc -> ssp . remote_sas_address_lo = SCIC_SWAP_DWORD ( this_rnc -> device -> device_address . low ) ; rnc -> ssp . nexus_loss_timer_enable = TRUE ; rnc -> ssp . check_bit = FALSE ; rnc -> ssp . is_valid = FALSE ; rnc -> ssp . is_remote_node_context = TRUE ; rnc -> ssp . function_number = 0 ; rnc -> ssp . arbitration_wait_time = 0 ; if ( this_rnc -> device -> target_protocols . u . bits . attached_sata_device || this_rnc -> device -> target_protocols . u . bits . attached_stp_target ) { rnc -> ssp . connection_occupancy_timeout = the_controller -> user_parameters . sds1 . stp_max_occupancy_timeout ; rnc -> ssp . connection_inactivity_timeout = the_controller -> user_parameters . sds1 . stp_inactivity_timeout ; } else { rnc -> ssp . connection_occupancy_timeout = the_controller -> user_parameters . sds1 . ssp_max_occupancy_timeout ; rnc -> ssp . connection_inactivity_timeout = the_controller -> user_parameters . sds1 . ssp_inactivity_timeout ; } rnc -> ssp . initial_arbitration_wait_time = 0 ; rnc -> ssp . oaf_connection_rate = this_rnc -> device -> connection_rate ; rnc -> ssp . oaf_features = 0 ; rnc -> ssp . oaf_source_zone_group = 0 ; rnc -> ssp . oaf_more_compatibility_features = 0 ; }
This method will construct the RNC buffer for this remote device object.
This method will construct the RNC buffer for this remote device object .
// Open Address Frame Parameters