Lines Matching +full:mode +full:- +full:based
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
9 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
22 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
28 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
59 * translate the SCSI mode sense (6 and 10-byte) commands.
84 * (i.e. non-volatile) are not supported.
133 * CDB being translated (e.g. 6-byte, 10-byte, 12-byte, etc.)
155 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_CACHING; in sati_mode_sense_is_page_code_supported()
157 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_CACHING; in sati_mode_sense_is_page_code_supported()
162 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_ALL_PAGES; in sati_mode_sense_is_page_code_supported()
164 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_ALL_PAGES; in sati_mode_sense_is_page_code_supported()
169 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_READ_WRITE_ERROR; in sati_mode_sense_is_page_code_supported()
171 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_READ_WRITE_ERROR; in sati_mode_sense_is_page_code_supported()
176 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_DISCONNECT_RECONNECT; in sati_mode_sense_is_page_code_supported()
178 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_DISCONNECT_RECONNECT; in sati_mode_sense_is_page_code_supported()
183 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_CONTROL; in sati_mode_sense_is_page_code_supported()
185 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_CONTROL; in sati_mode_sense_is_page_code_supported()
190 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_POWER_CONDITION; in sati_mode_sense_is_page_code_supported()
192 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_POWER_CONDITION; in sati_mode_sense_is_page_code_supported()
198 if ((sequence->device->capabilities | SATI_DEVICE_CAP_SMART_SUPPORT) in sati_mode_sense_is_page_code_supported()
201 // For a MODE SENSE, utilize INVALID FIELD IN CDB, in sati_mode_sense_is_page_code_supported()
202 // For a MODE SELECT, utilize INVALID FIELD IN PARAMETER LIST. in sati_mode_sense_is_page_code_supported()
230 sequence->type = SATI_SEQUENCE_MODE_SENSE_6_INFORMATIONAL_EXCP_CONTROL; in sati_mode_sense_is_page_code_supported()
232 sequence->type = SATI_SEQUENCE_MODE_SENSE_10_INFORMATIONAL_EXCP_CONTROL; in sati_mode_sense_is_page_code_supported()
256 * @brief This method will calculate the size of the mode sense data header.
260 * for which to calculate the mode page header.
264 * @return This method returns the size, in bytes, for the mode page header.
274 // The Mode page header length is different for 6-byte vs. 10-byte CDBs. in sati_mode_sense_calculate_page_header()
283 // The LLBAA bit is not defined for 6-byte mode sense requests. in sati_mode_sense_calculate_page_header()
295 * @brief This method performs command translation common to all mode sense
338 * @brief This method will build the standard block descriptor for a MODE
367 // Fill in the 4-byte logical block address field. in sati_mode_sense_build_std_block_descriptor()
385 * @brief This method simply copies the mode sense data into the buffer
393 * which to copy the mode page data.
396 * @param[in] page_code This specifies the mode sense page to copy.
398 * @return This method returns the size of the mode page data being copied.
415 // Copy the changeable mode page information. in sati_mode_sense_copy_initial_data()
440 * @brief This method performs the read/write error recovery mode page
441 * specific data translation based upon the contents of the remote
451 * @return This method returns the size of the mode page data that was
473 // Currently we do not override any bits in this mode page from the in sati_mode_sense_read_write_error_translate_data()
480 * @brief This method performs the disconnect/reconnect mode page
481 * specific data translation based upon the contents of the remote
491 * @return This method returns the size of the mode page data that was
513 // Currently we do not override any bits in this mode page from the in sati_mode_sense_disconnect_reconnect_translate_data()
520 * @brief This method performs the caching mode page specific data
521 * translation based upon the contents of the remote device IDENTIFY
531 * @return This method returns the size of the mode page data that was
559 // Update the Write Cache Enabled (WCE) bit in the mode page data in sati_mode_sense_caching_translate_data()
560 // buffer based on the identify response. in sati_mode_sense_caching_translate_data()
561 if ((identify->command_set_enabled0 & ATA_IDENTIFY_DEVICE_WCE_ENABLE) != 0) in sati_mode_sense_caching_translate_data()
567 sequence->number_data_bytes_set--; in sati_mode_sense_caching_translate_data()
570 // Update the Disable Read Ahead (DRA) bit in the mode page data in sati_mode_sense_caching_translate_data()
571 // buffer based on the identify response. in sati_mode_sense_caching_translate_data()
572 if ((identify->command_set_enabled0 & ATA_IDENTIFY_DEVICE_RA_ENABLE) == 0) in sati_mode_sense_caching_translate_data()
575 // - SCSI = Disable Read Ahead in sati_mode_sense_caching_translate_data()
576 // - ATA = Read Ahead in sati_mode_sense_caching_translate_data()
584 sequence->number_data_bytes_set--; in sati_mode_sense_caching_translate_data()
592 * @brief This method performs the control mode page specific data
593 * translation based upon the contents of the remote device
603 * @return This method returns the size of the mode page data that was
626 if (sequence->device->descriptor_sense_enable) in sati_mode_sense_control_translate_data()
639 * @brief This method performs the informational exceptions control mode
640 * page specific data translation based upon the contents of the
650 * @return This method returns the size of the mode page data that was
681 if ( (identify->command_set_supported0 in sati_mode_sense_informational_excp_control_translate_data()
683 && (identify->command_set_enabled0 in sati_mode_sense_informational_excp_control_translate_data()
701 sequence->number_data_bytes_set--; in sati_mode_sense_informational_excp_control_translate_data()
708 * @brief This method performs the Power Condition mode page
709 * specific data translation based upon the contents of the
719 * @return This method returns the size of the mode page data that was
740 (identify->capabilities1 & STANDBY_TIMER_SUPPORTED)) in sati_mode_sense_power_condition_translate_data()
744 ata_sb_timer = sequence->device->ata_standby_timer; in sati_mode_sense_power_condition_translate_data()
753 standby_timer = ((ata_sb_timer - 240) * 18000); in sati_mode_sense_power_condition_translate_data()
774 sati_set_data_byte(sequence, scsi_io, offset + 1, (SCSI_MODE_PAGE_1A_LENGTH - 2)); in sati_mode_sense_power_condition_translate_data()
790 * @brief This method performs the all pages mode page specific data
791 * translation based upon the contents of the remote device
792 * IDENTIFY DEVICE data. The ALL PAGES mode sense request asks
793 * for all of mode pages and sub-pages in a single page.
794 * The mode pages are added in ascending order.
803 * @return This method returns the size of the mode page data that was