FreeBSD/sys/dev/isci/scil/scic_sds_controller.c
/**
 * @brief This method sets user parameters and OEM parameters to
 *        default values.  Users can override these values utilizing
 *        the scic_user_parameters_set() and scic_oem_parameters_set()
 *        methods.
 *
 * @param[in] controller This parameter specifies the controller for
 *            which to set the configuration parameters to their
 *            default values.
 *
 * @return none
 */
@brief This method sets user parameters and OEM parameters to
default values.  Users can override these values utilizing
the scic_user_parameters_set() and scic_oem_parameters_set()
methods.

@param[in] controller This parameter specifies the controller for
which to set the configuration parameters to their
default values.

@return none
@brief This method sets user parameters and OEM parameters to default values . Users can override these values utilizing the scic_user_parameters_set () and scic_oem_parameters_set () methods . @param [ in ] controller This parameter specifies the controller for which to set the configuration parameters to their default values . @return none
static
void scic_sds_controller_set_default_config_parameters(
   SCIC_SDS_CONTROLLER_T *this_controller
)
{
   U16 index;
   this_controller->oem_parameters.sds1.controller.mode_type = SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE;
   this_controller->oem_parameters.sds1.controller.max_number_concurrent_device_spin_up = 1;
   this_controller->oem_parameters.sds1.controller.ssc_sata_tx_spread_level = 0;
   this_controller->oem_parameters.sds1.controller.ssc_sas_tx_spread_level  = 0;
   this_controller->oem_parameters.sds1.controller.ssc_sas_tx_type          = 0;
   this_controller->oem_parameters.sds1.controller.cable_selection_mask = 0;
   for (index = 0; index < SCI_MAX_PORTS; index++)
   {
      this_controller->oem_parameters.sds1.ports[index].phy_mask = 0;
   }
   for (index = 0; index < SCI_MAX_PHYS; index++)
   {
      this_controller->user_parameters.sds1.phys[index].max_speed_generation = 2;
      this_controller->user_parameters.sds1.phys[index].align_insertion_frequency = 0x7f;
      this_controller->user_parameters.sds1.phys[index].in_connection_align_insertion_frequency = 0xff;
      this_controller->user_parameters.sds1.phys[index].notify_enable_spin_up_insertion_frequency = 0x33;
      this_controller->oem_parameters.sds1.phys[index].sas_address.sci_format.high
         = 0x5FCFFFFF;
      this_controller->oem_parameters.sds1.phys[index].sas_address.sci_format.low
         = 0x00000001 + this_controller->controller_index;
      if (  (this_controller->pci_revision == SCIC_SDS_PCI_REVISION_A0)
         || (this_controller->pci_revision == SCIC_SDS_PCI_REVISION_A2)
         || (this_controller->pci_revision == SCIC_SDS_PCI_REVISION_B0) )
      {
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control0 = 0x000E7C03;
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control1 = 0x000E7C03;
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control2 = 0x000E7C03;
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control3 = 0x000E7C03;
      }
      else 
      {
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control0 = 0x000BDD08;
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control1 = 0x000B7069;
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control2 = 0x000B7C09;
         this_controller->oem_parameters.sds1.phys[index].afe_tx_amp_control3 = 0x000AFC6E;
      }
   }
   this_controller->user_parameters.sds1.stp_inactivity_timeout = 5;
   this_controller->user_parameters.sds1.ssp_inactivity_timeout = 5;
   this_controller->user_parameters.sds1.stp_max_occupancy_timeout = 5;
   this_controller->user_parameters.sds1.ssp_max_occupancy_timeout = 20;
   this_controller->user_parameters.sds1.no_outbound_task_timeout = 20;
}
static void scic_sds_controller_set_default_config_parameters ( SCIC_SDS_CONTROLLER_T * this_controller ) { U16 index ; this_controller -> oem_parameters . sds1 . controller . mode_type = SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE ; this_controller -> oem_parameters . sds1 . controller . max_number_concurrent_device_spin_up = 1 ; this_controller -> oem_parameters . sds1 . controller . ssc_sata_tx_spread_level = 0 ; this_controller -> oem_parameters . sds1 . controller . ssc_sas_tx_spread_level = 0 ; this_controller -> oem_parameters . sds1 . controller . ssc_sas_tx_type = 0 ; this_controller -> oem_parameters . sds1 . controller . cable_selection_mask = 0 ; for ( index = 0 ; index < SCI_MAX_PORTS ; index ++ ) { this_controller -> oem_parameters . sds1 . ports [ index ] . phy_mask = 0 ; } for ( index = 0 ; index < SCI_MAX_PHYS ; index ++ ) { this_controller -> user_parameters . sds1 . phys [ index ] . max_speed_generation = 2 ; this_controller -> user_parameters . sds1 . phys [ index ] . align_insertion_frequency = 0x7f ; this_controller -> user_parameters . sds1 . phys [ index ] . in_connection_align_insertion_frequency = 0xff ; this_controller -> user_parameters . sds1 . phys [ index ] . notify_enable_spin_up_insertion_frequency = 0x33 ; this_controller -> oem_parameters . sds1 . phys [ index ] . sas_address . sci_format . high = 0x5FCFFFFF ; this_controller -> oem_parameters . sds1 . phys [ index ] . sas_address . sci_format . low = 0x00000001 + this_controller -> controller_index ; if ( ( this_controller -> pci_revision == SCIC_SDS_PCI_REVISION_A0 ) || ( this_controller -> pci_revision == SCIC_SDS_PCI_REVISION_A2 ) || ( this_controller -> pci_revision == SCIC_SDS_PCI_REVISION_B0 ) ) { this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control0 = 0x000E7C03 ; this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control1 = 0x000E7C03 ; this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control2 = 0x000E7C03 ; this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control3 = 0x000E7C03 ; } else { this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control0 = 0x000BDD08 ; this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control1 = 0x000B7069 ; this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control2 = 0x000B7C09 ; this_controller -> oem_parameters . sds1 . phys [ index ] . afe_tx_amp_control3 = 0x000AFC6E ; } } this_controller -> user_parameters . sds1 . stp_inactivity_timeout = 5 ; this_controller -> user_parameters . sds1 . ssp_inactivity_timeout = 5 ; this_controller -> user_parameters . sds1 . stp_max_occupancy_timeout = 5 ; this_controller -> user_parameters . sds1 . ssp_max_occupancy_timeout = 20 ; this_controller -> user_parameters . sds1 . no_outbound_task_timeout = 20 ; }
@brief This method sets user parameters and OEM parameters to
        default values.
@brief This method sets user parameters and OEM parameters to default values .
// Default to APC mode. // Default to 1 // Default to no SSC operation. // Default to all phys to using short cables // Initialize all of the port parameter information to narrow ports. // Initialize all of the phy parameter information. // Default to 6G (i.e. Gen 3) for now.  User can override if // they choose. //the frequencies cannot be 0 // Previous Vitesse based expanders had a arbitration issue that // is worked around by having the upper 32-bits of SAS address // with a value greater then the Vitesse company identifier. // Hence, usage of 0x5FCFFFFF. // Add in controller index to ensure each controller will have unique SAS addresses by default. // This must be SCIC_SDS_PCI_REVISION_C0