FreeBSD/sys/dev/isci/scil/scif_sas_controller_state_handlers.c
/**
 * @brief This method checks that the memory descriptor list is valid
 *        and hasn't been corrupted in some way by the user.
 *
 * @param[in] fw_controller This parameter specifies the framework
 *            controller object for which to validation the MDL.
 *
 * @return This method returns a value indicating if the operation succeeded.
 * @retval SCI_SUCCESS This value indicates that MDL is valid.
 * @retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value indicates
 *         that some portion of the memory descriptor list is invalid.
 */
@brief This method checks that the memory descriptor list is valid
and hasn't been corrupted in some way by the user.

@param[in] fw_controller This parameter specifies the framework
controller object for which to validation the MDL.

@return This method returns a value indicating if the operation succeeded.
@retval SCI_SUCCESS This value indicates that MDL is valid.
@retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value indicates
that some portion of the memory descriptor list is invalid.
@brief This method checks that the memory descriptor list is valid and hasn ' t been corrupted in some way by the user . @param [ in ] fw_controller This parameter specifies the framework controller object for which to validation the MDL . @return This method returns a value indicating if the operation succeeded . @retval SCI_SUCCESS This value indicates that MDL is valid . @retval SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD This value indicates that some portion of the memory descriptor list is invalid .
static
SCI_STATUS scif_sas_controller_validate_mdl(
   SCIF_SAS_CONTROLLER_T * fw_controller
)
{
   BOOL is_mde_list_valid;
   is_mde_list_valid = sci_base_mde_is_valid(
                          &fw_controller->mdes[SCIF_SAS_MDE_INTERNAL_IO],
                          4,
                          fw_controller->internal_request_entries *
                             scif_sas_internal_request_get_object_size(),
                          SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS
                       );
   if (is_mde_list_valid == FALSE)
      return SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD;
   return SCI_SUCCESS;
}
static SCI_STATUS scif_sas_controller_validate_mdl ( SCIF_SAS_CONTROLLER_T * fw_controller ) { BOOL is_mde_list_valid ; is_mde_list_valid = sci_base_mde_is_valid ( & fw_controller -> mdes [ SCIF_SAS_MDE_INTERNAL_IO ] , 4 , fw_controller -> internal_request_entries * scif_sas_internal_request_get_object_size ( ) , SCI_MDE_ATTRIBUTE_PHYSICALLY_CONTIGUOUS ) ; if ( is_mde_list_valid == FALSE ) return SCI_FAILURE_UNSUPPORTED_INFORMATION_FIELD ; return SCI_SUCCESS ; }
@brief This method checks that the memory descriptor list is valid
        and hasn't been corrupted in some way by the user.
@brief This method checks that the memory descriptor list is valid and hasn ' t been corrupted in some way by the user .
// Currently there is only a single MDE in the list.