/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _SYS_SCSI_GENERIC_SMP_FRAMES_H
#define _SYS_SCSI_GENERIC_SMP_FRAMES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/sysmacros.h>
/*
* The definitions of smp frame types and functions conforming to SAS-1.1 and
* SAS-2. Consumers are expected to determine protocol support by examining
* the response to the REPORT GENERAL function.
*/
typedef enum smp_frame_type {
typedef enum smp_function {
typedef enum smp_result {
} smp_result_t;
#pragma pack(1)
/*
* SAS-2 10.4.3.2 request frame format
*/
typedef struct smp_request_frame {
/*
* SAS-2 10.4.3.3 response frame format
*/
typedef struct smp_response_frame {
#ifdef offsetof
#define SMP_REQ_MINLEN \
#define SMP_RESP_MINLEN \
#endif /* offsetof */
/*
* SAS-2 10.4.3.4 REPORT GENERAL (no additional request bytes)
*/
typedef struct smp_report_general_resp {
_reserved1 :7,
srgr_long_response :1);
srgr_configuring :1,
_reserved2 :2,
srgr_zone_locked :1,
_reserved6 :1,
srgr_saving :1,
_reserved7 :3);
_reserved11 :7,
typedef enum smp_n_zone_grps {
/*
* SAS-2 10.4.3.5 REPORT MANUFACTURER INFORMATION (no additional request bytes)
*/
typedef struct smp_report_manufacturer_info_resp {
_reserved2 :7);
/*
* SAS-2 10.4.3.6 REPORT SELF_CONFIGURATION STATUS
*/
typedef struct smp_report_self_config_status_req {
typedef struct smp_report_self_config_status_resp {
typedef struct smp_self_config_status_descr {
sscsd_final :1,
_reserved1 :7);
typedef enum smp_self_config_status_type {
/*
* SAS-2 10.4.3.7 REPORT ZONE PERMISSION TABLE
*/
typedef struct smp_report_zone_perm_table_req {
_reserved1 :6);
typedef enum smp_zone_perm_table_report_type {
typedef struct smp_report_zone_perm_table_resp {
_reserved1 :5,
srzptr_zone_locked :1);
_reserved2 :6,
/*
* SAS-2 10.4.3.8 REPORT ZONE MANAGER PASSWORD
*/
typedef enum smp_report_zmp_report_type {
typedef struct smp_report_zone_mgr_password_req {
srzmpr_rpt_type :2,
_reserved1 :6);
typedef struct smp_report_zone_mgr_password_resp {
srzmpr_rpt_type :2,
_reserved1 :6);
/*
* SAS-2 10.4.3.9 REPORT BROADCAST
*/
typedef struct smp_report_broadcast_req {
_reserved1 :4);
typedef enum smp_broadcast_type {
typedef struct smp_broadcast_descr {
_reserved1 :4);
_reserved2 :4);
typedef struct smp_report_broadcast_resp {
_reserved1 :4);
/*
* SAS-2 10.4.3.10 DISCOVER
*/
typedef struct smp_discover_req {
_reserved2 :7);
typedef struct smp_snw3_phy_cap {
_reserved1 :2,
sspc_tx_ssc_type :1,
sspc_start :1);
_reserved2 :2,
sspc_g3_ssc :1,
sspc_g3_no_ssc :1,
sspc_g2_ssc :1,
sspc_g2_no_ssc :1,
sspc_g1_ssc :1,
sspc_g1_no_ssc :1);
sspc_parity :1,
_reserved4 :7);
typedef struct smp_discover_resp {
_reserved3 :1);
_reserved4 :4);
_reserved5 :4);
_reserved6 :3,
_reserved7 :5);
_reserved9 :3,
sdr_virtual_phy :1);
_reserved10 :4);
_reserved11 :1);
sdr_inside_zpsds :1,
_reserved13 :1,
_reserved14 :1);
sdr_reason :4);
_reserved18 :6);
_reserved19 :1,
_reserved20 :1,
_reserved21 :2);
_reserved23 :1,
_reserved24 :1,
_reserved25 :2);
_reserved27 :2,
_reserved28 :1,
_reserved29 :2);
typedef enum smp_link_rate {
typedef enum smp_device_type {
typedef enum smp_routing_attr {
/*
* SAS-2 10.4.3.11 REPORT PHY ERROR LOG
*/
typedef struct smp_report_phy_error_log_req {
typedef struct smp_report_phy_error_log_resp {
/*
* SAS-2 10.4.3.12 REPORT PHY SATA
*/
typedef struct smp_report_phy_sata_req {
typedef struct smp_report_phy_sata_resp {
_reserved3 :5);
/*
* SAS-2 10.4.3.13 REPORT ROUTE INFORMATION
*/
typedef struct smp_report_route_info_req {
typedef struct smp_report_route_info_resp {
_reserved3 :7,
/*
* SAS-2 10.4.3.14 SAS-2 REPORT PHY EVENT
*/
typedef enum smp_phy_event_source {
typedef struct smp_report_phy_event_req {
typedef struct smp_phy_event_report_descr {
typedef struct smp_report_phy_event_resp {
/*
* SAS-2 10.4.3.15 SAS-2 DISCOVER LIST
*/
typedef struct smp_discover_list_req {
sdlr_phy_filter :4,
_reserved2 :3,
sdlr_descr_type :4,
_reserved3 :4);
typedef struct smp_discover_short_descr {
_restricted1 :1);
_restricted2 :4);
_restricted3 :4);
_restricted4 :3,
_reserved1 :3,
sdsd_virtual_phy :1);
_reserved2 :4,
sdsd_reason :4);
_reserved3 :1,
_reserved4 :1,
_restricted5 :2);
typedef struct smp_discover_long_descr {
NULL)
typedef struct smp_discover_list_resp {
sdlr_phy_filter :4,
_reserved2 :4);
sdlr_descr_type :4,
_reserved3 :4);
sdlr_configuring :1,
_reserved5 :4,
/*
* SAS-2 10.4.3.16 REPORT PHY EVENT LIST
*/
typedef struct smp_report_phy_event_list_req {
typedef struct smp_phy_event_list_descr {
typedef struct smp_report_phy_event_list_resp {
/*
* SAS-2 10.4.3.17 REPORT EXPANDER ROUTE TABLE LIST
*/
typedef struct smp_report_exp_route_table_list_req {
typedef struct smp_route_table_descr {
_reserved1 :7,
typedef struct smp_report_exp_route_table_list_resp {
_reserved2 :4);
/*
* SAS-2 10.4.3.18 CONFIGURE GENERAL (no additional response)
*/
typedef struct smp_config_general_req {
_reserved2 :3);
/*
* SAS-2 10.4.3.19 ENABLE DISABLE ZONING (no additional response)
*/
typedef struct smp_enable_disable_zoning_req {
_reserved1 :6);
_reserved3 :6);
typedef enum smp_zoning_save {
typedef enum smp_zoning_enable_op {
/*
* SAS-2 10.4.3.20 ZONED BROADCAST (no additional response)
*/
typedef struct smp_zoned_broadcast_req {
_reserved :4);
/*
* SAS-2 10.4.3.21 ZONE LOCK
*/
typedef struct smp_zone_lock_req {
typedef struct smp_zone_lock_resp {
/*
* SAS-2 10.4.3.22 ZONE ACTIVATE (no additional response)
*/
typedef struct smp_zone_activate_req {
/*
* SAS-2 10.4.3.23 ZONE UNLOCK (no additional response)
*/
typedef struct smp_zone_unlock_req {
_reserved1 :7);
/*
* SAS-2 10.4.3.24 CONFIGURE ZONE MANAGER PASSWORD (no additional response)
*/
typedef struct smp_config_zone_manager_password_req {
_reserved1 :6);
/*
* SAS-2 10.4.3.25 CONFIGURE ZONE PHY INFORMATION (no additional response)
*/
typedef struct smp_zone_phy_config_descr {
_reserved1 :2,
_reserved2 :1,
_reserved3 :2);
typedef struct smp_config_zone_phy_info_req {
_reserved1 :6);
/*
* SAS-2 10.4.3.26 CONFIGURE ZONE PERMISSION TABLE (no additional response)
*/
typedef struct smp_config_zone_perm_table_req {
_reserved1 :4,
/*
* SAS-2 10.4.3.27 CONFIGURE ROUTE INFORMATION (no additional response)
*/
typedef struct smp_config_route_info_req {
_reserved3 :7,
/*
* SAS-2 10.4.3.28 PHY CONTROL (no additional response)
*/
typedef struct smp_phy_control_req {
_reserved2 :7);
_reserved4 :4,
_reserved5 :4,
_reserved7 :4);
typedef enum smp_phy_op {
} smp_phy_op_t;
/*
* SAS-2 10.4.3.29 PHY TEST FUNCTION (no additional response)
*/
typedef struct smp_phy_test_function_req {
_reserved3 :1);
typedef enum smp_phy_test_function {
/*
* SAS-2 10.4.3.30 CONFIGURE PHY EVENT (no additional response)
*/
typedef struct smp_phy_event_config_descr {
typedef struct smp_config_phy_event_req {
_reserved1 :7);
#pragma pack()
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_GENERIC_SMP_FRAMES_H */