2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
39 * * Neither the name of Intel Corporation nor the names of its
40 * contributors may be used to endorse or promote products derived
41 * from this software without specific prior written permission.
43 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
44 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
45 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
46 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
47 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
49 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60 * This file contains all of the definitions relating to structures, constants,
61 * etc. defined by the SAS specification.
66 #include "intel_sata.h"
67 #include "intel_scsi.h"
70 * struct sci_sas_address - This structure depicts how a SAS address is
75 struct sci_sas_address {
77 * This member contains the higher 32-bits of the SAS address.
82 * This member contains the lower 32-bits of the SAS address.
89 * struct sci_sas_identify_address_frame_protocols - This structure depicts the
90 * contents of bytes 2 and 3 in the SAS IDENTIFY ADDRESS FRAME (IAF).
92 * For specific information on each of these individual fields please reference
93 * the SAS specification Link layer section on address frames.
95 struct sci_sas_identify_address_frame_protocols {
116 * struct sci_sas_identify_address_frame - This structure depicts the contents
117 * of the SAS IDENTIFY ADDRESS FRAME (IAF).
119 * For specific information on each of these individual fields please reference
120 * the SAS specification Link layer section on address frames.
122 struct sci_sas_identify_address_frame {
123 u16 address_frame_type:4;
129 struct sci_sas_identify_address_frame_protocols protocols;
131 struct sci_sas_address device_name;
132 struct sci_sas_address sas_address;
134 u32 phy_identifier:8;
135 u32 break_reply_capable:1;
136 u32 requested_in_zpsds:1;
137 u32 in_zpsds_persistent:1;
145 * struct sas_capabilities - This structure depicts the various SAS
146 * capabilities supported by the directly attached target device. For
147 * specific information on each of these individual fields please reference
148 * the SAS specification Phy layer section on speed negotiation windows.
152 struct sas_capabilities {
154 #if defined (SCIC_SDS_4_ENABLED)
157 * The SAS specification indicates the start bit shall always be set to
158 * 1. This implementation will have the start bit set to 0 if the
159 * PHY CAPABILITIES were either not received or speed negotiation failed.
164 u32 requested_logical_link_rate:4;
166 u32 gen1_without_ssc_supported:1;
167 u32 gen1_with_ssc_supported:1;
168 u32 gen2_without_ssc_supported:1;
169 u32 gen2_with_ssc_supported:1;
170 u32 gen3_without_ssc_supported:1;
171 u32 gen3_with_ssc_supported:1;
175 #endif /* (SCIC_SDS_4_ENABLED) */
183 * enum _SCI_SAS_TASK_ATTRIBUTE - This enumeration depicts the SAM/SAS
184 * specification defined task attribute values for a command information
189 enum sci_sas_task_attribute {
190 SCI_SAS_SIMPLE_ATTRIBUTE = 0,
191 SCI_SAS_HEAD_OF_QUEUE_ATTRIBUTE = 1,
192 SCI_SAS_ORDERED_ATTRIBUTE = 2,
193 SCI_SAS_ACA_ATTRIBUTE = 4,
197 * enum _SCI_SAS_TASK_MGMT_FUNCTION - This enumeration depicts the SAM/SAS
198 * specification defined task management functions.
200 * This HARD_RESET function listed here is not actually defined as a task
201 * management function in the industry standard.
203 enum sci_sas_task_mgmt_function {
204 SCI_SAS_ABORT_TASK = SCSI_TASK_REQUEST_ABORT_TASK,
205 SCI_SAS_ABORT_TASK_SET = SCSI_TASK_REQUEST_ABORT_TASK_SET,
206 SCI_SAS_CLEAR_TASK_SET = SCSI_TASK_REQUEST_CLEAR_TASK_SET,
207 SCI_SAS_LOGICAL_UNIT_RESET = SCSI_TASK_REQUEST_LOGICAL_UNIT_RESET,
208 SCI_SAS_I_T_NEXUS_RESET = SCSI_TASK_REQUEST_I_T_NEXUS_RESET,
209 SCI_SAS_CLEAR_ACA = SCSI_TASK_REQUEST_CLEAR_ACA,
210 SCI_SAS_QUERY_TASK = SCSI_TASK_REQUEST_QUERY_TASK,
211 SCI_SAS_QUERY_TASK_SET = SCSI_TASK_REQUEST_QUERY_TASK_SET,
212 SCI_SAS_QUERY_ASYNCHRONOUS_EVENT = SCSI_TASK_REQUEST_QUERY_UNIT_ATTENTION,
213 SCI_SAS_HARD_RESET = 0xFF
218 * enum _SCI_SAS_FRAME_TYPE - This enumeration depicts the SAS specification
219 * defined SSP frame types.
223 enum sci_sas_frame_type {
224 SCI_SAS_DATA_FRAME = 0x01,
225 SCI_SAS_XFER_RDY_FRAME = 0x05,
226 SCI_SAS_COMMAND_FRAME = 0x06,
227 SCI_SAS_RESPONSE_FRAME = 0x07,
228 SCI_SAS_TASK_FRAME = 0x16
232 * struct sci_ssp_command_iu - This structure depicts the contents of the SSP
233 * COMMAND INFORMATION UNIT. For specific information on each of these
234 * individual fields please reference the SAS specification SSP transport
239 struct sci_ssp_command_iu {
243 u32 additional_cdb_length:6;
246 u32 enable_first_burst:1;
248 u32 task_attribute:3;
256 * struct sci_ssp_task_iu - This structure depicts the contents of the SSP TASK
257 * INFORMATION UNIT. For specific information on each of these individual
258 * fields please reference the SAS specification SSP transport layer section.
262 struct sci_ssp_task_iu {
278 #define SSP_RESPONSE_IU_MAX_DATA 64
280 #define SCI_SSP_RESPONSE_IU_DATA_PRESENT_MASK (0x03)
283 #define sci_ssp_get_sense_data_length(sense_data_length_buffer) \
284 SCIC_BUILD_DWORD(sense_data_length_buffer)
286 #define sci_ssp_get_response_data_length(response_data_length_buffer) \
287 SCIC_BUILD_DWORD(response_data_length_buffer)
290 * struct sci_ssp_response_iu - This structure depicts the contents of the SSP
291 * RESPONSE INFORMATION UNIT. For specific information on each of these
292 * individual fields please reference the SAS specification SSP transport
297 struct sci_ssp_response_iu {
300 u8 retry_delay_timer[2];
305 u8 sense_data_length[4];
306 u8 response_data_length[4];
308 u32 data[SSP_RESPONSE_IU_MAX_DATA];
313 * enum _SCI_SAS_DATA_PRESENT_TYPE - This enumeration depicts the SAS
314 * specification defined SSP data present types in struct sci_ssp_response_iu.
318 enum sci_ssp_response_iu_data_present_type {
319 SCI_SSP_RESPONSE_IU_NO_DATA = 0x00,
320 SCI_SSP_RESPONSE_IU_RESPONSE_DATA = 0x01,
321 SCI_SSP_RESPONSE_IU_SENSE_DATA = 0x02
325 * struct sci_ssp_frame_header - This structure depicts the contents of an SSP
326 * frame header. For specific information on the individual fields please
327 * reference the SAS specification transport layer SSP frame format.
331 struct sci_ssp_frame_header {
333 u32 hashed_destination_address:24;
337 u32 hashed_source_address:24;
345 u32 retry_data_frames:1;
347 u32 changing_data_pointer:1;
354 u16 target_port_transfer_tag;
363 * struct smp_request_header - This structure defines the contents of an SMP
366 * For specific information on each of these individual fields please reference
367 * the SAS specification.
369 struct smp_request_header {
370 u8 smp_frame_type; /* byte 0 */
371 u8 function; /* byte 1 */
372 u8 allocated_response_length; /* byte 2 */
373 u8 request_length; /* byte 3 */
377 * struct smp_response_header - This structure depicts the contents of the SAS
378 * SMP DISCOVER RESPONSE frame. For specific information on each of these
379 * individual fields please reference the SAS specification Link layer
380 * section on address frames.
384 struct smp_response_header {
385 u8 smp_frame_type; /* byte 0 */
386 u8 function; /* byte 1 */
387 u8 function_result; /* byte 2 */
388 u8 response_length; /* byte 3 */
392 * struct smp_request_general - This structure defines the contents of an SMP
393 * Request that is comprised of the struct smp_request_header and a CRC.
395 * For specific information on each of these individual fields please reference
396 * the SAS specification.
398 struct smp_request_general {
399 u32 crc; /* bytes 4-7 */
404 * struct smp_request_phy_identifier - This structure defines the contents of
405 * an SMP Request that is comprised of the struct smp_request_header and a phy
406 * identifier. Examples: SMP_REQUEST_DISCOVER, SMP_REQUEST_REPORT_PHY_SATA.
408 * For specific information on each of these individual fields please reference
409 * the SAS specification.
411 struct smp_request_phy_identifier {
412 u32 reserved_byte4_7; /* bytes 4-7 */
414 u32 ignore_zone_group:1; /* byte 8 */
415 u32 reserved_byte8:7;
417 u32 phy_identifier:8; /* byte 9 */
418 u32 reserved_byte10:8; /* byte 10 */
419 u32 reserved_byte11:8; /* byte 11 */
424 * struct smp_request_configure_route_information - This structure defines the
425 * contents of an SMP Configure Route Information request.
427 * For specific information on each of these individual fields please reference
428 * the SAS specification.
430 struct smp_request_configure_route_information {
431 u32 expected_expander_change_count:16; /* bytes 4-5 */
432 u32 expander_route_index_high:8;
433 u32 expander_route_index:8; /* bytes 6-7 */
435 u32 reserved_byte8:8; /* bytes 8 */
436 u32 phy_identifier:8; /* bytes 9 */
437 u32 reserved_byte_10_11:16; /* bytes 10-11 */
439 u32 reserved_byte_12_bit_0_6:7;
440 u32 disable_route_entry:1; /* byte 12 */
441 u32 reserved_byte_13_15:24; /* bytes 13-15 */
443 u32 routed_sas_address[2]; /* bytes 16-23 */
444 u8 reserved_byte_24_39[16]; /* bytes 24-39 */
449 * struct smp_request_phy_control - This structure defines the contents of an
450 * SMP Phy Controler request.
452 * For specific information on each of these individual fields please reference
453 * the SAS specification.
455 struct smp_request_phy_control {
456 u16 expected_expander_change_count; /* byte 4-5 */
458 u16 reserved_byte_6_7; /* byte 6-7 */
459 u8 reserved_byte_8; /* byte 8 */
461 u8 phy_identifier; /* byte 9 */
462 u8 phy_operation; /* byte 10 */
464 u8 update_partial_pathway_timeout_value:1;
465 u8 reserved_byte_11_bit_1_7:7; /* byte 11 */
467 u8 reserved_byte_12_23[12]; /* byte 12-23 */
469 u8 attached_device_name[8]; /* byte 24-31 */
471 u8 reserved_byte_32_bit_3_0:4; /* byte 32 */
472 u8 programmed_minimum_physical_link_rate:4;
474 u8 reserved_byte_33_bit_3_0:4; /* byte 33 */
475 u8 programmed_maximum_physical_link_rate:4;
477 u16 reserved_byte_34_35; /* byte 34-35 */
479 u8 partial_pathway_timeout_value:4;
480 u8 reserved_byte_36_bit_4_7:4; /* byte 36 */
482 u16 reserved_byte_37_38; /* byte 37-38 */
483 u8 reserved_byte_39; /* byte 39 */
488 * struct smp_request_vendor_specific - This structure depicts the vendor
489 * specific space for SMP request.
493 #define SMP_REQUEST_VENDOR_SPECIFIC_MAX_LENGTH 1016
494 struct smp_request_vendor_specific {
495 u8 request_bytes[SMP_REQUEST_VENDOR_SPECIFIC_MAX_LENGTH];
499 * struct smp_request - This structure simply unionizes the existing request
500 * structures into a common request type.
505 struct smp_request_header header;
507 union { /* bytes 4-N */
508 struct smp_request_general report_general;
509 struct smp_request_phy_identifier discover;
510 struct smp_request_general report_manufacturer_information;
511 struct smp_request_phy_identifier report_phy_sata;
512 struct smp_request_phy_control phy_control;
513 struct smp_request_phy_identifier report_phy_error_log;
514 struct smp_request_phy_identifier report_route_information;
515 struct smp_request_configure_route_information configure_route_information;
516 struct smp_request_vendor_specific vendor_specific_request;
523 * struct smp_response_report_general - This structure depicts the SMP Report
524 * General for expander devices. It adheres to the SAS-2.1 specification.
526 * For specific information on each of these individual fields please reference
527 * the SAS specification Application layer section on SMP.
529 struct smp_response_report_general {
530 u16 expander_change_count; /* byte 4-5 */
531 u16 expander_route_indexes; /* byte 6-7 */
533 u32 reserved_byte8:7; /* byte 8 bit 0-6 */
534 u32 long_response:1; /* byte 8 bit 7 */
536 u32 number_of_phys:8; /* byte 9 */
538 u32 configurable_route_table:1; /* byte 10 */
540 u32 configures_others:1;
541 u32 open_reject_retry_supported:1;
542 u32 stp_continue_awt:1;
543 u32 self_configuring:1;
544 u32 zone_configuring:1;
545 u32 table_to_table_supported:1;
547 u32 reserved_byte11:8; /* byte 11 */
549 u32 enclosure_logical_identifier_high; /* byte 12-15 */
550 u32 enclosure_logical_identifier_low; /* byte 16-19 */
552 u32 reserved_byte20_23;
553 u32 reserved_byte24_27;
557 struct smp_response_report_general_long {
558 struct smp_response_report_general sas1_1;
562 u16 stp_bus_inactivity_time_limit;
563 u16 stp_max_connect_time_limit;
564 u16 stp_smp_i_t_nexus_loss_time;
566 u32 zoning_enabled:1;
567 u32 zoning_supported:1;
568 u32 physicaL_presence_asserted:1;
571 u32 num_zone_groups:3;
572 u32 saving_zoning_enabled_supported:3;
573 u32 saving_zone_perms_table_supported:1;
574 u32 saving_zone_phy_info_supported:1;
575 u32 saving_zone_manager_password_supported:1;
578 u32 max_number_routed_sas_addresses:16;
580 struct sci_sas_address active_zone_manager_sas_address;
582 u16 zone_lock_inactivity_time_limit;
586 u8 first_enclosure_connector_element_index;
587 u8 number_of_enclosure_connector_element_indices;
591 u32 reduced_functionality:1;
592 u32 time_to_reduce_functionality:8;
593 u32 initial_time_to_reduce_functionality:8;
594 u8 max_reduced_functionality_time;
596 u16 last_self_config_status_descriptor_index;
597 u16 max_number_of_stored_self_config_status_descriptors;
599 u16 last_phy_event_list_descriptor_index;
600 u16 max_number_of_stored_phy_event_list_descriptors;
606 * struct smp_response_report_manufacturer_information - This structure depicts
607 * the SMP report manufacturer information for expander devices. It adheres
608 * to the SAS-2.1 specification.
610 * For specific information on each of these individual fields please reference
611 * the SAS specification Application layer section on SMP.
613 struct smp_response_report_manufacturer_information {
614 u32 expander_change_count:16; /* bytes 4-5 */
622 u8 product_revision_level[4];
623 u8 component_vendor_id[8];
625 u8 component_revision_level;
627 u8 vendor_specific[8];
631 #define SMP_RESPONSE_DISCOVER_FORMAT_1_1_SIZE 52
632 #define SMP_RESPONSE_DISCOVER_FORMAT_2_SIZE 116
635 * struct smp_discover_response_protocols - This structure depicts the discover
636 * response where the supported protocols by the remote phy are specified.
638 * For specific information on each of these individual fields please reference
639 * the SAS specification Link layer section on address frames.
641 struct smp_discover_response_protocols {
644 u16 attached_sata_host:1;
645 u16 attached_smp_initiator:1;
646 u16 attached_stp_initiator:1;
647 u16 attached_ssp_initiator:1;
649 u16 attached_sata_device:1;
650 u16 attached_smp_target:1;
651 u16 attached_stp_target:1;
652 u16 attached_ssp_target:1;
654 u16 attached_sata_port_selector:1;
663 * struct SMP_RESPONSE_DISCOVER_FORMAT - This structure defines the SMP phy
664 * discover response format. It handles both SAS1.1 and SAS 2 definitions.
665 * The unions indicate locations where the SAS specification versions differ
670 struct smp_response_discover {
678 u16 expander_change_count;
690 u16 attached_device_type:3;
692 u16 negotiated_physical_link_rate:4;
697 u16 attached_reason:4;
698 u16 attached_device_type:3;
700 u16 negotiated_logical_link_rate:4;
706 struct smp_discover_response_protocols protocols;
707 struct sci_sas_address sas_address;
708 struct sci_sas_address attached_sas_address;
710 u8 attached_phy_identifier;
718 u8 attached_break_reply_capable:1;
719 u8 attached_requested_inside_zpsds:1;
720 u8 attached_inside_zpsds_persistent:1;
726 u8 reserved_for_identify[6];
728 u32 hardware_min_physical_link_rate:4;
729 u32 programmed_min_physical_link_rate:4;
730 u32 hardware_max_physical_link_rate:4;
731 u32 programmed_max_physical_link_rate:4;
732 u32 phy_change_count:8;
733 u32 partial_pathway_timeout_value:4;
737 u32 routing_attribute:4;
739 u32 connector_type:7;
741 u32 connector_element_index:8;
742 u32 connector_physical_link:8;
750 * In the SAS 1.1 specification this structure ends after 52 bytes.
751 * As a result, the contents of this field should never have a
752 * real value. It is undefined.
754 u8 undefined[SMP_RESPONSE_DISCOVER_FORMAT_2_SIZE
755 - SMP_RESPONSE_DISCOVER_FORMAT_1_1_SIZE];
759 struct sci_sas_address attached_device_name;
761 u32 zoning_enabled:1;
763 u32 zone_group_persistent:1;
765 u32 requested_inside_zpsds:1;
766 u32 inside_zpsds_persistent:1;
767 u32 requested_inside_zpsds_changed_by_expander:1;
769 u32 reserved_for_zoning_fields:16;
772 u8 self_configuration_status;
773 u8 self_configuration_levels_completed;
774 u16 reserved_for_self_config_fields;
776 struct sci_sas_address self_configuration_sas_address;
778 u32 programmed_phy_capabilities;
779 u32 current_phy_capabilities;
780 u32 attached_phy_capabilities;
785 u32 negotiated_physical_link_rate:4;
787 u32 hardware_muxing_supported:1;
788 u32 negotiated_ssc:1;
791 u32 default_zoning_enabled:1;
793 u32 default_zone_group_persistent:1;
795 u32 default_requested_inside_zpsds:1;
796 u32 default_inside_zpsds_persistent:1;
799 u32 default_zone_group:8;
801 u32 saved_zoning_enabled:1;
803 u32 saved_zone_group_persistent:1;
805 u32 saved_requested_inside_zpsds:1;
806 u32 saved_inside_zpsds_persistent:1;
808 u32 saved_zone_group:8;
811 u32 shadow_zone_group_persistent:1;
813 u32 shadow_requested_inside_zpsds:1;
814 u32 shadow_inside_zpsds_persistent:1;
816 u32 shadow_zone_group:8;
818 u8 device_slot_number;
819 u8 device_slot_group_number;
820 u8 device_slot_group_output_connector[6];
828 * struct smp_response_report_phy_sata - This structure depicts the contents of
829 * the SAS SMP REPORT PHY SATA frame. For specific information on each of
830 * these individual fields please reference the SAS specification Link layer
831 * section on address frames.
835 struct smp_response_report_phy_sata {
836 u32 ignored_byte_4_7; /* bytes 4-7 */
838 u32 affiliations_valid:1;
839 u32 affiliations_supported:1;
840 u32 reserved_byte11:6; /* byte 11 */
841 u32 ignored_byte10:8; /* byte 10 */
842 u32 phy_identifier:8; /* byte 9 */
843 u32 reserved_byte_8:8; /* byte 8 */
846 u32 stp_sas_address[2];
847 u8 device_to_host_fis[20];
849 u32 affiliated_stp_initiator_sas_address[2];
853 struct smp_response_vendor_specific {
854 u8 response_bytes[SMP_REQUEST_VENDOR_SPECIFIC_MAX_LENGTH];
857 union smp_response_body {
858 struct smp_response_report_general report_general;
859 struct smp_response_report_manufacturer_information report_manufacturer_information;
860 struct smp_response_discover discover;
861 struct smp_response_report_phy_sata report_phy_sata;
862 struct smp_response_vendor_specific vendor_specific_response;
866 * struct smp_response - This structure simply unionizes the existing response
867 * structures into a common response type.
871 struct smp_response {
872 struct smp_response_header header;
874 union smp_response_body response;
878 /* SMP Request Functions */
879 #define SMP_FUNCTION_REPORT_GENERAL 0x00
880 #define SMP_FUNCTION_REPORT_MANUFACTURER_INFORMATION 0x01
881 #define SMP_FUNCTION_DISCOVER 0x10
882 #define SMP_FUNCTION_REPORT_PHY_ERROR_LOG 0x11
883 #define SMP_FUNCTION_REPORT_PHY_SATA 0x12
884 #define SMP_FUNCTION_REPORT_ROUTE_INFORMATION 0X13
885 #define SMP_FUNCTION_CONFIGURE_ROUTE_INFORMATION 0X90
886 #define SMP_FUNCTION_PHY_CONTROL 0x91
887 #define SMP_FUNCTION_PHY_TEST 0x92
889 #define SMP_FRAME_TYPE_REQUEST 0x40
890 #define SMP_FRAME_TYPE_RESPONSE 0x41
892 #define PHY_OPERATION_NOP 0x00
893 #define PHY_OPERATION_LINK_RESET 0x01
894 #define PHY_OPERATION_HARD_RESET 0x02
895 #define PHY_OPERATION_DISABLE 0x03
896 #define PHY_OPERATION_CLEAR_ERROR_LOG 0x05
897 #define PHY_OPERATION_CLEAR_AFFILIATION 0x06
899 #define NPLR_PHY_ENABLED_UNK_LINK_RATE 0x00
900 #define NPLR_PHY_DISABLED 0x01
901 #define NPLR_PHY_ENABLED_SPD_NEG_FAILED 0x02
902 #define NPLR_PHY_ENABLED_SATA_HOLD 0x03
903 #define NPLR_PHY_ENABLED_1_5G 0x08
904 #define NPLR_PHY_ENABLED_3_0G 0x09
906 /* SMP Function Result values. */
907 #define SMP_RESULT_FUNCTION_ACCEPTED 0x00
908 #define SMP_RESULT_UNKNOWN_FUNCTION 0x01
909 #define SMP_RESULT_FUNCTION_FAILED 0x02
910 #define SMP_RESULT_INVALID_REQUEST_FRAME_LEN 0x03
911 #define SMP_RESULT_INAVALID_EXPANDER_CHANGE_COUNT 0x04
912 #define SMP_RESULT_BUSY 0x05
913 #define SMP_RESULT_INCOMPLETE_DESCRIPTOR_LIST 0x06
914 #define SMP_RESULT_PHY_DOES_NOT_EXIST 0x10
915 #define SMP_RESULT_INDEX_DOES_NOT_EXIST 0x11
916 #define SMP_RESULT_PHY_DOES_NOT_SUPPORT_SATA 0x12
917 #define SMP_RESULT_UNKNOWN_PHY_OPERATION 0x13
918 #define SMP_RESULT_UNKNOWN_PHY_TEST_FUNCTION 0x14
919 #define SMP_RESULT_PHY_TEST_IN_PROGRESS 0x15
920 #define SMP_RESULT_PHY_VACANT 0x16
922 /* Attached Device Types */
923 #define SMP_NO_DEVICE_ATTACHED 0
924 #define SMP_END_DEVICE_ONLY 1
925 #define SMP_EDGE_EXPANDER_DEVICE 2
926 #define SMP_FANOUT_EXPANDER_DEVICE 3
928 /* Expander phy routine attribute */
929 #define DIRECT_ROUTING_ATTRIBUTE 0
930 #define SUBTRACTIVE_ROUTING_ATTRIBUTE 1
931 #define TABLE_ROUTING_ATTRIBUTE 2
933 #endif /* _INTEL_SAS_H_ */