FreeBSD/sys/dev/isci/scil/sati_mode_select.c
/**
 * @brief This method will get mode page size.
 *
 * @param[in] page_code This parameter contains page code for the current mode page.
 *
 * @return This method returns the size of current mode page.
 */
@brief This method will get mode page size.
@param[in] page_code This parameter contains page code for the current mode page.

@return This method returns the size of current mode page.
@brief This method will get mode page size . @param [ in ] page_code This parameter contains page code for the current mode page . @return This method returns the size of current mode page .
static
U32 sati_mode_select_get_mode_page_size(
   U8 page_code
)
{
   U32 page_size=0;
   switch (page_code)
   {
   case SCSI_MODE_PAGE_READ_WRITE_ERROR:
      page_size=SCSI_MODE_PAGE_01_LENGTH;
      break;
   case SCSI_MODE_PAGE_DISCONNECT_RECONNECT:
      page_size=SCSI_MODE_PAGE_02_LENGTH;
      break;
   case SCSI_MODE_PAGE_CACHING:
      page_size=SCSI_MODE_PAGE_08_LENGTH;
      break;
   case SCSI_MODE_PAGE_CONTROL:
      page_size=SCSI_MODE_PAGE_0A_LENGTH;
      break;
   case SCSI_MODE_PAGE_INFORMATIONAL_EXCP_CONTROL:
      page_size=SCSI_MODE_PAGE_1C_LENGTH;
      break;
   case SCSI_MODE_PAGE_POWER_CONDITION:
      page_size=SCSI_MODE_PAGE_1A_LENGTH;
      break;
   default:
      page_size=0;
      break;
   }
   return page_size;
}
static U32 sati_mode_select_get_mode_page_size ( U8 page_code ) { U32 page_size = 0 ; switch ( page_code ) { case SCSI_MODE_PAGE_READ_WRITE_ERROR : page_size = SCSI_MODE_PAGE_01_LENGTH ; break ; case SCSI_MODE_PAGE_DISCONNECT_RECONNECT : page_size = SCSI_MODE_PAGE_02_LENGTH ; break ; case SCSI_MODE_PAGE_CACHING : page_size = SCSI_MODE_PAGE_08_LENGTH ; break ; case SCSI_MODE_PAGE_CONTROL : page_size = SCSI_MODE_PAGE_0A_LENGTH ; break ; case SCSI_MODE_PAGE_INFORMATIONAL_EXCP_CONTROL : page_size = SCSI_MODE_PAGE_1C_LENGTH ; break ; case SCSI_MODE_PAGE_POWER_CONDITION : page_size = SCSI_MODE_PAGE_1A_LENGTH ; break ; default : page_size = 0 ; break ; } return page_size ; }
@brief This method will get mode page size.
@brief This method will get mode page size .