FreeBSD/sys/dev/isci/scil/scic_sds_phy.c
/**
 * This method returns the supported protocols for the attached phy.  If this
 * is a SAS phy the protocols are returned from the identify address frame.
 * If this is a SATA phy then protocols are made up and the target phy is an
 * STP target phy.
 *
 * @note The caller will get the entire set of bits for the protocol value.
 *
 * @param[in] this_phy The parameter is the phy object for which the attached
 *       phy protcols are to be returned.
 * @param[out] protocols The parameter is the returned protocols for the
 *       attached phy.
 */
This method returns the supported protocols for the attached phy.  If this
is a SAS phy the protocols are returned from the identify address frame.
If this is a SATA phy then protocols are made up and the target phy is an
STP target phy.

@note The caller will get the entire set of bits for the protocol value.

@param[in] this_phy The parameter is the phy object for which the attached
phy protcols are to be returned.
@param[out] protocols The parameter is the returned protocols for the
attached phy.
This method returns the supported protocols for the attached phy . If this is a SAS phy the protocols are returned from the identify address frame . If this is a SATA phy then protocols are made up and the target phy is an STP target phy . @note The caller will get the entire set of bits for the protocol value . @param [ in ] this_phy The parameter is the phy object for which the attached phy protcols are to be returned . @param [ out ] protocols The parameter is the returned protocols for the attached phy .
void scic_sds_phy_get_attached_phy_protocols(
   SCIC_SDS_PHY_T *this_phy,
   SCI_SAS_IDENTIFY_ADDRESS_FRAME_PROTOCOLS_T * protocols
)
{
   SCIC_LOG_TRACE((
      sci_base_object_get_logger(this_phy),
      SCIC_LOG_OBJECT_PHY,
      "scic_sds_phy_get_attached_phy_protocols(this_phy:0x%x, protocols:0x%x[0x%x])\n",
      this_phy, protocols, protocols->u.all
   ));
   protocols->u.all = 0;
   if (this_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS)
   {
      protocols->u.all =
         this_phy->phy_type.sas.identify_address_frame_buffer.protocols.u.all;
   }
   else if (this_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA)
   {
      protocols->u.bits.stp_target = 1;
   }
}
void scic_sds_phy_get_attached_phy_protocols ( SCIC_SDS_PHY_T * this_phy , SCI_SAS_IDENTIFY_ADDRESS_FRAME_PROTOCOLS_T * protocols ) { SCIC_LOG_TRACE ( ( sci_base_object_get_logger ( this_phy ) , SCIC_LOG_OBJECT_PHY , " \n " , this_phy , protocols , protocols -> u . all ) ) ; protocols -> u . all = 0 ; if ( this_phy -> protocol == SCIC_SDS_PHY_PROTOCOL_SAS ) { protocols -> u . all = this_phy -> phy_type . sas . identify_address_frame_buffer . protocols . u . all ; } else if ( this_phy -> protocol == SCIC_SDS_PHY_PROTOCOL_SATA ) { protocols -> u . bits . stp_target = 1 ; } }
This method returns the supported protocols for the attached phy.
This method returns the supported protocols for the attached phy .