1936b7af6Sjw /*
2936b7af6Sjw  * CDDL HEADER START
3936b7af6Sjw  *
4936b7af6Sjw  * The contents of this file are subject to the terms of the
5936b7af6Sjw  * Common Development and Distribution License (the "License").
6936b7af6Sjw  * You may not use this file except in compliance with the License.
7936b7af6Sjw  *
8936b7af6Sjw  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9936b7af6Sjw  * or http://www.opensolaris.org/os/licensing.
10936b7af6Sjw  * See the License for the specific language governing permissions
11936b7af6Sjw  * and limitations under the License.
12936b7af6Sjw  *
13936b7af6Sjw  * When distributing Covered Code, include this CDDL HEADER in each
14936b7af6Sjw  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15936b7af6Sjw  * If applicable, add the following below this CDDL HEADER, with the
16936b7af6Sjw  * fields enclosed by brackets "[]" replaced with your own identifying
17936b7af6Sjw  * information: Portions Copyright [yyyy] [name of copyright owner]
18936b7af6Sjw  *
19936b7af6Sjw  * CDDL HEADER END
20936b7af6Sjw  */
21936b7af6Sjw 
22936b7af6Sjw /*
23*4c06356bSdh  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24936b7af6Sjw  * Use is subject to license terms.
25936b7af6Sjw  */
26936b7af6Sjw 
27*4c06356bSdh #ifndef _SYS_SCSI_GENERIC_SMP_FRAMES_H
28*4c06356bSdh #define	_SYS_SCSI_GENERIC_SMP_FRAMES_H
29936b7af6Sjw 
30936b7af6Sjw #ifdef	__cplusplus
31936b7af6Sjw extern "C" {
32936b7af6Sjw #endif
33936b7af6Sjw 
34936b7af6Sjw #include <sys/sysmacros.h>
35936b7af6Sjw 
36936b7af6Sjw /*
37*4c06356bSdh  * The definitions of smp frame types and functions conforming to SAS-1.1 and
38*4c06356bSdh  * SAS-2.  Consumers are expected to determine protocol support by examining
39*4c06356bSdh  * the response to the REPORT GENERAL function.
40936b7af6Sjw  */
41936b7af6Sjw 
42*4c06356bSdh typedef enum smp_frame_type {
43936b7af6Sjw 	SMP_FRAME_TYPE_REQUEST		= 0x40,
44936b7af6Sjw 	SMP_FRAME_TYPE_RESPONSE		= 0x41
45*4c06356bSdh } smp_frame_type_t;
46*4c06356bSdh 
47*4c06356bSdh typedef enum smp_function {
48*4c06356bSdh 	SMP_FUNC_REPORT_GENERAL			= 0x00,
49*4c06356bSdh 	SMP_FUNC_REPORT_MANUFACTURER_INFO	= 0x01,
50*4c06356bSdh 	SMP_FUNC_READ_GPIO_REGISTER		= 0x02,
51*4c06356bSdh 	SMP_FUNC_REPORT_SELF_CONFIG_STATUS	= 0x03,
52*4c06356bSdh 	SMP_FUNC_REPORT_ZONE_PERM_TABLE		= 0x04,
53*4c06356bSdh 	SMP_FUNC_REPORT_ZONE_MANAGER_PASSWORD	= 0x05,
54*4c06356bSdh 	SMP_FUNC_REPORT_BROADCAST		= 0x06,
55*4c06356bSdh 	SMP_FUNC_DISCOVER			= 0x10,
56*4c06356bSdh 	SMP_FUNC_REPORT_PHY_ERROR_LOG		= 0x11,
57*4c06356bSdh 	SMP_FUNC_REPORT_PHY_SATA		= 0x12,
58*4c06356bSdh 	SMP_FUNC_REPORT_ROUTE_INFO		= 0x13,
59*4c06356bSdh 	SMP_FUNC_REPORT_PHY_EVENT		= 0x14,
60*4c06356bSdh 	SMP_FUNC_DISCOVER_LIST			= 0x20,
61*4c06356bSdh 	SMP_FUNC_REPORT_PHY_EVENT_LIST		= 0x21,
62*4c06356bSdh 	SMP_FUNC_REPORT_EXP_ROUTE_TABLE_LIST	= 0x22,
63*4c06356bSdh 	SMP_FUNC_CONFIG_GENERAL			= 0x80,
64*4c06356bSdh 	SMP_FUNC_ENABLE_DISABLE_ZONING		= 0x81,
65*4c06356bSdh 	SMP_FUNC_WRITE_GPIO_REGISTER		= 0x82,
66*4c06356bSdh 	SMP_FUNC_ZONED_BROADCAST		= 0x85,
67*4c06356bSdh 	SMP_FUNC_ZONE_LOCK			= 0x86,
68*4c06356bSdh 	SMP_FUNC_ZONE_ACTIVATE			= 0x87,
69*4c06356bSdh 	SMP_FUNC_ZONE_UNLOCK			= 0x88,
70*4c06356bSdh 	SMP_FUNC_CONFIG_ZONE_MANAGER_PASSWORD	= 0x89,
71*4c06356bSdh 	SMP_FUNC_CONFIG_ZONE_PHY_INFO		= 0x8A,
72*4c06356bSdh 	SMP_FUNC_CONFIG_ZONE_PERM_TABLE		= 0x8B,
73*4c06356bSdh 	SMP_FUNC_CONFIG_ROUTE_INFO		= 0x90,
74*4c06356bSdh 	SMP_FUNC_PHY_CONTROL			= 0x91,
75*4c06356bSdh 	SMP_FUNC_PHY_TEST_FUNCTION		= 0x92,
76*4c06356bSdh 	SMP_FUNC_CONFIG_PHY_EVENT		= 0x93
77*4c06356bSdh } smp_function_t;
78936b7af6Sjw 
79*4c06356bSdh typedef enum smp_result {
80*4c06356bSdh 	SMP_RES_FUNCTION_ACCEPTED		= 0x00,
81*4c06356bSdh 	SMP_RES_UNKNOWN_FUNCTION		= 0x01,
82*4c06356bSdh 	SMP_RES_FUNCTION_FAILED			= 0x02,
83*4c06356bSdh 	SMP_RES_INVALID_REQUEST_FRAME_LENGTH	= 0x03,
84*4c06356bSdh 	SMP_RES_INVALID_EXPANDER_CHANGE_COUNT	= 0x04,
85*4c06356bSdh 	SMP_RES_BUSY				= 0x05,
86*4c06356bSdh 	SMP_RES_INCOMPLETE_DESCRIPTOR_LIST	= 0x06,
87*4c06356bSdh 	SMP_RES_PHY_DOES_NOT_EXIST		= 0x10,
88*4c06356bSdh 	SMP_RES_INDEX_DOES_NOT_EXIST		= 0x11,
89*4c06356bSdh 	SMP_RES_PHY_DOES_NOT_SUPPORT_SATA	= 0x12,
90*4c06356bSdh 	SMP_RES_UNKNOWN_PHY_OPERATION		= 0x13,
91*4c06356bSdh 	SMP_RES_UNKNOWN_PHY_TEST_FUNCTION	= 0x14,
92*4c06356bSdh 	SMP_RES_PHY_TEST_IN_PROGRESS		= 0x15,
93*4c06356bSdh 	SMP_RES_PHY_VACANT			= 0x16,
94*4c06356bSdh 	SMP_RES_UNKNOWN_PHY_EVENT_SOURCE	= 0x17,
95*4c06356bSdh 	SMP_RES_UNKNOWN_DESCRIPTOR_TYPE		= 0x18,
96*4c06356bSdh 	SMP_RES_UNKNOWN_PHY_FILTER		= 0x19,
97*4c06356bSdh 	SMP_RES_AFFILIATION_VIOLATION		= 0x1A,
98*4c06356bSdh 	SMP_RES_ZONE_VIOLATION			= 0x20,
99*4c06356bSdh 	SMP_RES_NO_MANAGEMENT_ACCESS_RIGHTS	= 0x21,
100*4c06356bSdh 	SMP_RES_UNKNOWN_ENABLE_DISABLE_ZONING	= 0x22,
101*4c06356bSdh 	SMP_RES_ZONE_LOCK_VIOLATION		= 0x23,
102*4c06356bSdh 	SMP_RES_NOT_ACTIVATED			= 0x24,
103*4c06356bSdh 	SMP_RES_ZONE_GROUP_OUT_OF_RANGE		= 0x25,
104*4c06356bSdh 	SMP_RES_NO_PHYSICAL_PRESENCE		= 0x26,
105*4c06356bSdh 	SMP_RES_SAVING_NOT_SUPPORTED		= 0x27,
106*4c06356bSdh 	SMP_RES_SOURCE_ZONE_GROUP_DNE		= 0x28,
107*4c06356bSdh 	SMP_RES_NONE				= -1
108*4c06356bSdh } smp_result_t;
109*4c06356bSdh 
110*4c06356bSdh #pragma	pack(1)
111936b7af6Sjw 
112936b7af6Sjw /*
113*4c06356bSdh  * SAS-2 10.4.3.2 request frame format
114936b7af6Sjw  */
115*4c06356bSdh typedef struct smp_request_frame {
116*4c06356bSdh 	uint8_t srf_frame_type;
117*4c06356bSdh 	uint8_t srf_function;
118*4c06356bSdh 	uint8_t srf_allocated_response_len;	/* reserved in SAS-1 */
119*4c06356bSdh 	uint8_t srf_request_len;
120*4c06356bSdh 	uint8_t srf_data[1];
121*4c06356bSdh } smp_request_frame_t;
122936b7af6Sjw 
123*4c06356bSdh /*
124*4c06356bSdh  * SAS-2 10.4.3.3 response frame format
125*4c06356bSdh  */
126*4c06356bSdh typedef struct smp_response_frame {
127*4c06356bSdh 	uint8_t srf_frame_type;
128*4c06356bSdh 	uint8_t srf_function;
129*4c06356bSdh 	uint8_t srf_result;
130*4c06356bSdh 	uint8_t srf_response_len;	/* reserved in SAS-1 */
131*4c06356bSdh 	uint8_t srf_data[1];
132*4c06356bSdh } smp_response_frame_t;
133*4c06356bSdh 
134*4c06356bSdh typedef uint8_t smp_crc_t[4];
135*4c06356bSdh 
136*4c06356bSdh #ifdef offsetof
137*4c06356bSdh #define	SMP_REQ_MINLEN	\
138*4c06356bSdh 	(offsetof(smp_request_frame_t, srf_data[0]) + sizeof (smp_crc_t))
139*4c06356bSdh #define	SMP_RESP_MINLEN	\
140*4c06356bSdh 	(offsetof(smp_response_frame_t, srf_data[0]) + sizeof (smp_crc_t))
141*4c06356bSdh #endif	/* offsetof */
142*4c06356bSdh 
143*4c06356bSdh /*
144*4c06356bSdh  * SAS-2 10.4.3.4 REPORT GENERAL (no additional request bytes)
145*4c06356bSdh  */
146*4c06356bSdh typedef struct smp_report_general_resp {
147*4c06356bSdh 	uint16_t srgr_exp_change_count;
148*4c06356bSdh 	uint16_t srgr_exp_route_indexes;
149*4c06356bSdh 	DECL_BITFIELD2(
150*4c06356bSdh 	    _reserved1		:7,
151*4c06356bSdh 	    srgr_long_response	:1);
152*4c06356bSdh 	uint8_t srgr_number_of_phys;
153*4c06356bSdh 	DECL_BITFIELD7(
154*4c06356bSdh 	    srgr_externally_configurable_route_table	:1,
155*4c06356bSdh 	    srgr_configuring				:1,
156*4c06356bSdh 	    srgr_configures_others			:1,
157*4c06356bSdh 	    srgr_open_reject_retry_supported		:1,
158*4c06356bSdh 	    srgr_stp_continue_awt			:1,
159*4c06356bSdh 	    _reserved2					:2,
160*4c06356bSdh 	    srgr_table_to_table_supported		:1);
161*4c06356bSdh 	uint8_t _reserved3;
162*4c06356bSdh 	uint64_t srgr_enclosure_logical_identifier;
163*4c06356bSdh 	uint8_t _reserved4[8];
164*4c06356bSdh 	uint8_t _reserved5[2];
165*4c06356bSdh 	uint16_t srgr_stp_bus_inactivity_time_limit;
166*4c06356bSdh 	uint16_t srgr_stp_maximum_connect_time_limit;
167*4c06356bSdh 	uint16_t srgr_stp_smp_nexus_loss_time;
168*4c06356bSdh 	DECL_BITFIELD7(
169*4c06356bSdh 	    srgr_zoning_enabled				:1,
170*4c06356bSdh 	    srgr_zoning_supported			:1,
171*4c06356bSdh 	    srgr_physical_presence_asserted		:1,
172*4c06356bSdh 	    srgr_physical_presence_supported		:1,
173*4c06356bSdh 	    srgr_zone_locked				:1,
174*4c06356bSdh 	    _reserved6					:1,
175*4c06356bSdh 	    srgr_number_of_zone_grps			:2);
176*4c06356bSdh 	DECL_BITFIELD6(
177*4c06356bSdh 	    srgr_saving_zoning_enabled_supported	:1,
178*4c06356bSdh 	    srgr_saving_zone_perm_table_supported	:1,
179*4c06356bSdh 	    srgr_saving_zone_phy_info_supported		:1,
180*4c06356bSdh 	    srgr_saving_zone_mgr_password_supported	:1,
181*4c06356bSdh 	    srgr_saving					:1,
182*4c06356bSdh 	    _reserved7					:4);
183*4c06356bSdh 	uint16_t srgr_max_routed_sas_addrs;
184*4c06356bSdh 	uint64_t srgr_active_zm_sas_addr;
185*4c06356bSdh 	uint16_t srgr_zone_lock_inactivity_limit;
186*4c06356bSdh 	uint8_t _reserved8[2];
187*4c06356bSdh 	uint8_t _reserved9;
188*4c06356bSdh 	uint8_t srgr_first_encl_conn_elem_idx;
189*4c06356bSdh 	uint8_t srgr_number_encl_conn_elem_idxs;
190*4c06356bSdh 	uint8_t _reserved10;
191*4c06356bSdh 	DECL_BITFIELD2(
192*4c06356bSdh 	    _reserved11					:7,
193*4c06356bSdh 	    srgr_reduced_functionality			:1);
194*4c06356bSdh 	uint8_t srgr_time_to_reduced_functionality;
195*4c06356bSdh 	uint8_t srgr_initial_time_to_reduced_functionality;
196*4c06356bSdh 	uint8_t srgr_max_reduced_functionality_time;
197*4c06356bSdh 	uint16_t srgr_last_self_conf_status_descr_idx;
198*4c06356bSdh 	uint16_t srgr_max_stored_self_config_status_descrs;
199*4c06356bSdh 	uint16_t srgr_last_phy_event_list_descr_idx;
200*4c06356bSdh 	uint16_t srgr_max_stored_phy_event_list_descrs;
201*4c06356bSdh 	uint16_t srgr_stp_reject_to_open_limit;
202*4c06356bSdh 	uint8_t _reserved12[2];
203*4c06356bSdh } smp_report_general_resp_t;
204*4c06356bSdh 
205*4c06356bSdh typedef enum smp_n_zone_grps {
206*4c06356bSdh 	SMP_ZONE_GROUPS_128	= 0x0,
207*4c06356bSdh 	SMP_ZONE_GROUPS_256	= 0x1
208*4c06356bSdh } smp_n_zone_grps_t;
209*4c06356bSdh 
210*4c06356bSdh /*
211*4c06356bSdh  * SAS-2 10.4.3.5 REPORT MANUFACTURER INFORMATION (no additional request bytes)
212*4c06356bSdh  */
213*4c06356bSdh typedef struct smp_report_manufacturer_info_resp {
214*4c06356bSdh 	uint16_t srmir_exp_change_count;
215*4c06356bSdh 	uint8_t _reserved1[2];
216*4c06356bSdh 	DECL_BITFIELD2(
217*4c06356bSdh 	    srmir_sas_1_1_format	:1,
218*4c06356bSdh 	    _reserved2			:7);
219*4c06356bSdh 	uint8_t _reserved3[3];
220*4c06356bSdh 	char srmir_vendor_identification[8];
221*4c06356bSdh 	char srmir_product_identification[16];
222*4c06356bSdh 	char srmir_product_revision_level[4];
223*4c06356bSdh 	char srmir_component_vendor_identification[8];
224*4c06356bSdh 	uint16_t srmir_component_id;
225*4c06356bSdh 	uint8_t srmir_component_revision_level;
226*4c06356bSdh 	uint8_t _reserved4;
227*4c06356bSdh 	uint8_t srmir_vs_52[8];
228*4c06356bSdh } smp_report_manufacturer_info_resp_t;
229*4c06356bSdh 
230*4c06356bSdh /*
231*4c06356bSdh  * SAS-2 10.4.3.6 REPORT SELF_CONFIGURATION STATUS
232*4c06356bSdh  */
233*4c06356bSdh typedef struct smp_report_self_config_status_req {
234*4c06356bSdh 	uint8_t _reserved1[2];
235*4c06356bSdh 	uint16_t srscsr_starting_self_config_status_descr_idx;
236*4c06356bSdh } smp_report_self_config_status_req_t;
237*4c06356bSdh 
238*4c06356bSdh typedef struct smp_report_self_config_status_resp {
239*4c06356bSdh 	uint16_t srscsr_exp_change_count;
240*4c06356bSdh 	uint16_t srscsr_starting_self_config_status_descr_idx;
241*4c06356bSdh 	uint16_t srscsr_number_self_config_status_descrs;
242*4c06356bSdh 	uint16_t srscsr_last_self_config_status_descr_idx;
243*4c06356bSdh 	uint8_t srscsr_self_config_status_descr_len;
244*4c06356bSdh 	uint8_t _reserved1[3];
245*4c06356bSdh 	uint8_t srscsr_descrs[1];
246*4c06356bSdh } smp_report_self_config_status_resp_t;
247*4c06356bSdh 
248*4c06356bSdh typedef struct smp_self_config_status_descr {
249*4c06356bSdh 	uint8_t sscsd_status_type;
250*4c06356bSdh 	DECL_BITFIELD2(
251*4c06356bSdh 	    sscsd_final		:1,
252*4c06356bSdh 	    _reserved1		:7);
253*4c06356bSdh 	uint8_t _reserved2;
254*4c06356bSdh 	uint8_t sscsd_phy_identifier;
255*4c06356bSdh 	uint8_t _reserved3[4];
256*4c06356bSdh 	uint64_t sscsd_sas_addr;
257*4c06356bSdh } smp_self_config_status_descr_t;
258*4c06356bSdh 
259*4c06356bSdh typedef enum smp_self_config_status_type {
260*4c06356bSdh 	SMP_SCST_NONSPECIFIC_ERROR	= 0x01,
261*4c06356bSdh 	SMP_SCST_CONNECTION		= 0x02,
262*4c06356bSdh 	SMP_SCST_ROUTE_TABLE_FULL	= 0x03,
263*4c06356bSdh 	SMP_SCST_NOMEM			= 0x04,
264*4c06356bSdh 	SMP_SCST_PHY_LAYER_ERROR	= 0x20,
265*4c06356bSdh 	SMP_SCST_LOST_SYNC		= 0x21,
266*4c06356bSdh 	SMP_SCST_LINK_LAYER_ERROR	= 0x40,
267*4c06356bSdh 	SMP_SCST_OPEN_TIMEOUT		= 0x41,
268*4c06356bSdh 	SMP_SCST_ABANDON_OPEN_REJECT	= 0x42,
269*4c06356bSdh 	SMP_SCST_RETRY_OPEN_REJECTS	= 0x43,
270*4c06356bSdh 	SMP_SCST_NEXUS_LOSS		= 0x44,
271*4c06356bSdh 	SMP_SCST_BREAK			= 0x45,
272*4c06356bSdh 	SMP_SCST_CRC_ERROR		= 0x46,
273*4c06356bSdh 	SMP_SCST_PORT_LAYER_ERROR	= 0x60,
274*4c06356bSdh 	SMP_SCST_RESPONSE_TIMEOUT	= 0x61,
275*4c06356bSdh 	SMP_SCST_TRANSPORT_LAYER_ERROR	= 0x80,
276*4c06356bSdh 	SMP_SCST_APP_LAYER_ERROR	= 0xA0,
277*4c06356bSdh 	SMP_SCST_RESPONSE_TOO_SHORT	= 0xA1,
278*4c06356bSdh 	SMP_SCST_UNSUPPORTED_VALUES	= 0xA2,
279*4c06356bSdh 	SMP_SCST_INCONSISTENT		= 0xA3,
280*4c06356bSdh 	SMP_SCST_CONFIGURING		= 0xA4
281*4c06356bSdh } smp_self_config_status_type_t;
282*4c06356bSdh 
283*4c06356bSdh /*
284*4c06356bSdh  * SAS-2 10.4.3.7 REPORT ZONE PERMISSION TABLE
285*4c06356bSdh  */
286*4c06356bSdh typedef struct smp_report_zone_perm_table_req {
287*4c06356bSdh 	DECL_BITFIELD2(
288*4c06356bSdh 	    srzptr_report_type		:2,
289*4c06356bSdh 	    _reserved1			:6);
290*4c06356bSdh 	uint8_t _reserved2;
291*4c06356bSdh 	uint8_t srzptr_starting_src_zone_grp;
292*4c06356bSdh 	uint8_t srzptr_max_zone_perm_descrs;
293*4c06356bSdh } smp_report_zone_perm_table_req_t;
294*4c06356bSdh 
295*4c06356bSdh typedef enum smp_zone_perm_table_report_type {
296*4c06356bSdh 	SMP_ZPTRT_CURRENT		= 0x0,
297*4c06356bSdh 	SMP_ZPTRT_SHADOW		= 0x1,
298*4c06356bSdh 	SMP_ZPTRT_SAVED			= 0x2,
299*4c06356bSdh 	SMP_ZPTRT_DEFAULT		= 0x3
300*4c06356bSdh } smp_zone_perm_table_report_type_t;
301*4c06356bSdh 
302*4c06356bSdh typedef struct smp_report_zone_perm_table_resp {
303*4c06356bSdh 	uint16_t srzptr_exp_change_count;
304936b7af6Sjw 	DECL_BITFIELD3(
305*4c06356bSdh 	    srzptr_report_type		:2,
306*4c06356bSdh 	    _reserved1			:5,
307*4c06356bSdh 	    srzptr_zone_locked		:1);
308*4c06356bSdh 	DECL_BITFIELD2(
309*4c06356bSdh 	    _reserved2			:6,
310*4c06356bSdh 	    srzptr_number_zone_grps	:2);
311*4c06356bSdh 	uint8_t _reserved3[6];
312*4c06356bSdh 	uint8_t srzptr_starting_src_zone_grp;
313*4c06356bSdh 	uint8_t srzptr_number_zone_perm_descrs;
314*4c06356bSdh 	uint8_t srzptr_descrs[1];
315*4c06356bSdh } smp_report_zone_perm_table_resp_t;
316*4c06356bSdh 
317*4c06356bSdh typedef uint8_t smp_zone_perm_descr128_t[16];
318*4c06356bSdh typedef uint8_t smp_zone_perm_descr256_t[32];
319*4c06356bSdh 
320*4c06356bSdh #define	SMP_ZONE_PERM_BIT128(__d, __z)	\
321*4c06356bSdh 	((__d)[15 - ((__z) >> 3)] & (1 << ((__z) & 7)))
322*4c06356bSdh 
323*4c06356bSdh #define	SMP_ZONE_PERM_SET128(__d, __z)	\
324*4c06356bSdh 	((__d)[15 - ((__z) >> 3)] |= (1 << ((__z) & 7)))
325*4c06356bSdh 
326*4c06356bSdh #define	SMP_ZONE_PERM_CLR128(__d, __z)	\
327*4c06356bSdh 	((__d)[15 - ((__z) >> 3)] &= ~(1 << ((__z) & 7)))
328*4c06356bSdh 
329*4c06356bSdh #define	SMP_ZONE_PERM_BIT256(__d, __z)	\
330*4c06356bSdh 	((__d)[31 - ((__z) >> 3)] & (1 << ((__z) & 7)))
331*4c06356bSdh 
332*4c06356bSdh #define	SMP_ZONE_PERM_SET256(__d, __z)	\
333*4c06356bSdh 	((__d)[31 - ((__z) >> 3)] |= (1 << ((__z) & 7)))
334*4c06356bSdh 
335*4c06356bSdh #define	SMP_ZONE_PERM_CLR256(__d, __z)	\
336*4c06356bSdh 	((__d)[31 - ((__z) >> 3)] &= ~(1 << ((__z) & 7)))
337*4c06356bSdh 
338*4c06356bSdh /*
339*4c06356bSdh  * SAS-2 10.4.3.8 REPORT ZONE MANAGER PASSWORD (no additional request bytes)
340*4c06356bSdh  */
341*4c06356bSdh typedef struct smp_report_zone_mgr_password_resp {
342*4c06356bSdh 	uint16_t srzmpr_exp_change_count;
343*4c06356bSdh 	uint8_t _reserved1[2];
344*4c06356bSdh 	uint8_t srzmpr_zone_mgr_password[32];
345*4c06356bSdh } smp_report_zone_mgr_password_resp_t;
346*4c06356bSdh 
347*4c06356bSdh /*
348*4c06356bSdh  * SAS-2 10.4.3.9 REPORT BROADCAST
349*4c06356bSdh  */
350*4c06356bSdh typedef struct smp_report_broadcast_req {
351*4c06356bSdh 	DECL_BITFIELD2(
352*4c06356bSdh 	    srbr_broadcast_type		:4,
353*4c06356bSdh 	    _reserved1			:4);
354*4c06356bSdh 	uint8_t _reserved2[3];
355*4c06356bSdh } smp_report_broadcast_req_t;
356*4c06356bSdh 
357*4c06356bSdh typedef enum smp_broadcast_type {
358*4c06356bSdh 	SMP_BROADCAST_CHANGE		= 0x0,
359*4c06356bSdh 	SMP_BROADCAST_RESERVED_CHANGE_0	= 0x1,
360*4c06356bSdh 	SMP_BROADCAST_RESERVED_CHANGE_1	= 0x2,
361*4c06356bSdh 	SMP_BROADCAST_SES		= 0x3,
362*4c06356bSdh 	SMP_BROADCAST_EXPANDER		= 0x4,
363*4c06356bSdh 	SMP_BROADCAST_ASYNC_EVENT	= 0x5,
364*4c06356bSdh 	SMP_BROADCAST_RESERVED_3	= 0x6,
365*4c06356bSdh 	SMP_BROADCAST_RESERVED_4	= 0x7,
366*4c06356bSdh 	SMP_BROADCAST_ZONE_ACTIVATE	= 0x8
367*4c06356bSdh } smp_broadcast_type_t;
368*4c06356bSdh 
369*4c06356bSdh typedef struct smp_broadcast_descr {
370*4c06356bSdh 	DECL_BITFIELD2(
371*4c06356bSdh 	    sbd_broadcast_type		:4,
372*4c06356bSdh 	    _reserved1			:4);
373*4c06356bSdh 	uint8_t sbd_phy_identifier;
374*4c06356bSdh 	DECL_BITFIELD2(
375*4c06356bSdh 	    sbd_broadcast_reason	:4,
376*4c06356bSdh 	    _reserved2			:4);
377*4c06356bSdh 	uint16_t sbd_broadcast_count;
378*4c06356bSdh 	uint8_t _reserved3[10];
379*4c06356bSdh } smp_broadcast_descr_t;
380*4c06356bSdh 
381*4c06356bSdh typedef struct smp_report_broadcast_resp {
382*4c06356bSdh 	uint16_t srbr_exp_change_count;
383*4c06356bSdh 	DECL_BITFIELD2(
384*4c06356bSdh 	    srbr_broadcast_type		:4,
385*4c06356bSdh 	    _reserved1			:4);
386*4c06356bSdh 	uint8_t srbr_number_broadcast_descrs;
387*4c06356bSdh 	smp_broadcast_descr_t srbr_descrs[1];
388*4c06356bSdh } smp_report_broadcast_resp_t;
389*4c06356bSdh 
390*4c06356bSdh /*
391*4c06356bSdh  * SAS-2 10.4.3.10 DISCOVER
392*4c06356bSdh  */
393*4c06356bSdh typedef struct smp_discover_req {
394*4c06356bSdh 	uint8_t _reserved1[4];
395*4c06356bSdh 	DECL_BITFIELD2(
396*4c06356bSdh 	    sdr_ignore_zone_grp		:1,
397*4c06356bSdh 	    _reserved2			:7);
398*4c06356bSdh 	uint8_t sdr_phy_identifier;
399*4c06356bSdh 	uint8_t _reserved3[2];
400*4c06356bSdh } smp_discover_req_t;
401*4c06356bSdh 
402*4c06356bSdh typedef struct smp_snw3_phy_cap {
403*4c06356bSdh 	DECL_BITFIELD4(
404*4c06356bSdh 	    sspc_requested_logical_link_rate	:4,	/* smp_link_rate_t */
405*4c06356bSdh 	    _reserved1				:2,
406*4c06356bSdh 	    sspc_tx_ssc_type			:1,
407*4c06356bSdh 	    sspc_start				:1);
408*4c06356bSdh 	DECL_BITFIELD7(
409*4c06356bSdh 	    _reserved2				:2,
410*4c06356bSdh 	    sspc_g3_ssc				:1,
411*4c06356bSdh 	    sspc_g3_no_ssc			:1,
412*4c06356bSdh 	    sspc_g2_ssc				:1,
413*4c06356bSdh 	    sspc_g2_no_ssc			:1,
414*4c06356bSdh 	    sspc_g1_ssc				:1,
415*4c06356bSdh 	    sspc_g1_no_ssc			:1);
416*4c06356bSdh 	uint8_t _reserved3;
417*4c06356bSdh 	DECL_BITFIELD2(
418*4c06356bSdh 	    sspc_parity		:1,
419*4c06356bSdh 	    _reserved4		:7);
420*4c06356bSdh } smp_snw3_phy_cap_t;
421*4c06356bSdh 
422*4c06356bSdh typedef struct smp_discover_resp {
423*4c06356bSdh 	uint16_t sdr_exp_change_count;
424*4c06356bSdh 	uint8_t _reserved1[3];
425*4c06356bSdh 	uint8_t sdr_phy_identifier;
426*4c06356bSdh 	uint8_t _reserved2[2];
427*4c06356bSdh 	DECL_BITFIELD3(
428*4c06356bSdh 	    sdr_attached_reason		:4,
429*4c06356bSdh 	    sdr_attached_device_type	:3,
430*4c06356bSdh 	    _reserved3			:1);
431*4c06356bSdh 	DECL_BITFIELD2(
432*4c06356bSdh 	    sdr_negotiated_logical_link_rate	:4,	/* smp_link_rate_t */
433*4c06356bSdh 	    _reserved4				:4);
434*4c06356bSdh 	DECL_BITFIELD5(
435*4c06356bSdh 	    sdr_attached_sata_host	:1,
436*4c06356bSdh 	    sdr_attached_smp_initiator	:1,
437*4c06356bSdh 	    sdr_attached_stp_initiator	:1,
438*4c06356bSdh 	    sdr_attached_ssp_initiator	:1,
439*4c06356bSdh 	    _reserved5			:4);
440*4c06356bSdh 	DECL_BITFIELD6(
441*4c06356bSdh 	    sdr_attached_sata_device		:1,
442*4c06356bSdh 	    sdr_attached_smp_target		:1,
443*4c06356bSdh 	    sdr_attached_stp_target		:1,
444*4c06356bSdh 	    sdr_attached_ssp_target		:1,
445*4c06356bSdh 	    _reserved6				:3,
446*4c06356bSdh 	    sdr_attached_sata_port_selector	:1);
447*4c06356bSdh 	uint64_t sdr_sas_addr;
448*4c06356bSdh 	uint64_t sdr_attached_sas_addr;
449*4c06356bSdh 	uint8_t sdr_attached_phy_identifier;
450*4c06356bSdh 	DECL_BITFIELD4(
451*4c06356bSdh 	    sdr_attached_break_reply_capable		:1,
452*4c06356bSdh 	    sdr_attached_requested_inside_zpsds		:1,
453*4c06356bSdh 	    sdr_attached_inside_zpsds_persistent	:1,
454*4c06356bSdh 	    _reserved7					:5);
455*4c06356bSdh 	uint8_t _reserved8[6];
456*4c06356bSdh 	DECL_BITFIELD2(
457*4c06356bSdh 	    sdr_hw_min_phys_link_rate	:4,	/* smp_link_rate_t */
458*4c06356bSdh 	    sdr_prog_min_phys_link_rate	:4);	/* smp_link_rate_t */
459*4c06356bSdh 	DECL_BITFIELD2(
460*4c06356bSdh 	    sdr_hw_max_phys_link_rate	:4,	/* smp_link_rate_t */
461*4c06356bSdh 	    sdr_prog_max_phys_link_rate	:4);	/* smp_link_rate_t */
462*4c06356bSdh 	uint8_t sdr_phy_change_count;
463*4c06356bSdh 	DECL_BITFIELD3(
464*4c06356bSdh 	    sdr_partial_pwy_timeout	:4,
465*4c06356bSdh 	    _reserved9			:3,
466*4c06356bSdh 	    sdr_virtual_phy		:1);
467*4c06356bSdh 	DECL_BITFIELD2(
468*4c06356bSdh 	    sdr_routing_attr		:4,	/* smp_routing_attr_t */
469*4c06356bSdh 	    _reserved10			:4);
470*4c06356bSdh 	DECL_BITFIELD2(
471*4c06356bSdh 	    sdr_connector_type		:7,
472*4c06356bSdh 	    _reserved11			:1);
473*4c06356bSdh 	uint8_t sdr_connector_element_index;
474*4c06356bSdh 	uint8_t sdr_connector_physical_link;
475*4c06356bSdh 	uint8_t _reserved12[2];
476*4c06356bSdh 	uint8_t sdr_vendor[2];
477*4c06356bSdh 	uint64_t sdr_attached_device_name;
478*4c06356bSdh 	DECL_BITFIELD8(
479*4c06356bSdh 	    sdr_zoning_enabled				:1,
480*4c06356bSdh 	    sdr_inside_zpsds				:1,
481*4c06356bSdh 	    sdr_zone_group_persistent			:1,
482*4c06356bSdh 	    _reserved13					:1,
483*4c06356bSdh 	    sdr_requested_inside_zpsds			:1,
484*4c06356bSdh 	    sdr_inside_zpsds_persistent			:1,
485*4c06356bSdh 	    sdr_requested_inside_zpsds_changed_by_exp	:1,
486*4c06356bSdh 	    _reserved14					:1);
487*4c06356bSdh 	uint8_t _reserved15[2];
488*4c06356bSdh 	uint8_t sdr_zone_group;
489*4c06356bSdh 	uint8_t sdr_self_config_status;
490*4c06356bSdh 	uint8_t sdr_self_config_levels_completed;
491*4c06356bSdh 	uint8_t _reserved16[2];
492*4c06356bSdh 	uint64_t sdr_self_config_sas_addr;
493*4c06356bSdh 	smp_snw3_phy_cap_t sdr_prog_phy_cap;
494*4c06356bSdh 	smp_snw3_phy_cap_t sdr_current_phy_cap;
495*4c06356bSdh 	smp_snw3_phy_cap_t sdr_attached_phy_cap;
496*4c06356bSdh 	uint8_t _reserved17[6];
497*4c06356bSdh 	DECL_BITFIELD2(
498*4c06356bSdh 	    sdr_negotiated_phys_link_rate	:4,	/* smp_link_rate_t */
499*4c06356bSdh 	    sdr_reason				:4);
500*4c06356bSdh 	DECL_BITFIELD3(
501*4c06356bSdh 	    sdr_hw_muxing_supported	:1,
502*4c06356bSdh 	    sdr_negotiated_ssc		:1,
503*4c06356bSdh 	    _reserved18			:6);
504*4c06356bSdh 	DECL_BITFIELD7(
505*4c06356bSdh 	    sdr_default_zoning_enabled		:1,
506*4c06356bSdh 	    _reserved19				:1,
507*4c06356bSdh 	    sdr_default_zone_group_persistent	:1,
508*4c06356bSdh 	    _reserved20				:1,
509*4c06356bSdh 	    sdr_default_requested_inside_zpsds	:1,
510*4c06356bSdh 	    sdr_default_inside_zpsds_persistent	:1,
511*4c06356bSdh 	    _reserved21				:2);
512*4c06356bSdh 	uint8_t _reserved22[2];
513*4c06356bSdh 	uint8_t sdr_default_zone_group;
514*4c06356bSdh 	DECL_BITFIELD7(
515*4c06356bSdh 	    sdr_saved_zoning_enabled		:1,
516*4c06356bSdh 	    _reserved23				:1,
517*4c06356bSdh 	    sdr_saved_zone_group_persistent	:1,
518*4c06356bSdh 	    _reserved24				:1,
519*4c06356bSdh 	    sdr_saved_requested_inside_zpsds	:1,
520*4c06356bSdh 	    sdr_saved_inside_zpsds_persistent	:1,
521*4c06356bSdh 	    _reserved25				:2);
522*4c06356bSdh 	uint8_t _reserved26[2];
523*4c06356bSdh 	uint8_t saved_zone_group;
524*4c06356bSdh 	DECL_BITFIELD6(
525*4c06356bSdh 	    _reserved27				:2,
526*4c06356bSdh 	    sdr_shadow_zone_group_persistent	:1,
527*4c06356bSdh 	    _reserved28				:1,
528*4c06356bSdh 	    sdr_shadow_requested_inside_zpsds	:1,
529*4c06356bSdh 	    sdr_shadow_inside_zpsds_persistent	:1,
530*4c06356bSdh 	    _reserved29				:2);
531*4c06356bSdh 	uint8_t _reserved30[2];
532*4c06356bSdh 	uint8_t sdr_shadow_zone_group;
533*4c06356bSdh } smp_discover_resp_t;
534*4c06356bSdh 
535*4c06356bSdh typedef enum smp_link_rate {
536*4c06356bSdh 	SMP_LINK_RATE_NO_CHANGE = 0x0,
537*4c06356bSdh 	SMP_LINK_RATE_DISABLED = 0x1,
538*4c06356bSdh 	SMP_LINK_RATE_RESET_PROBLEM = 0x2,
539*4c06356bSdh 	SMP_LINK_RATE_SPINUP_HOLD = 0x3,
540*4c06356bSdh 	SMP_LINK_RATE_PORT_SELECTOR = 0x4,
541*4c06356bSdh 	SMP_LINK_RATE_RESET = 0x5,
542*4c06356bSdh 	SMP_LINK_RATE_UNSUPPORTED = 0x6,
543*4c06356bSdh 	SMP_LINK_RATE_1_5 = 0x8,
544*4c06356bSdh 	SMP_LINK_RATE_3 = 0x9,
545*4c06356bSdh 	SMP_LINK_RATE_6 = 0xA
546*4c06356bSdh } smp_link_rate_t;
547*4c06356bSdh 
548*4c06356bSdh typedef enum smp_device_type {
549*4c06356bSdh 	SMP_DEV_NONE = 0x0,
550*4c06356bSdh 	SMP_DEV_SAS_SATA = 0x1,
551*4c06356bSdh 	SMP_DEV_EXPANDER = 0x2,
552*4c06356bSdh 	SMP_DEV_EXPANDER_OLD = 0x3
553*4c06356bSdh } smp_device_type_t;
554*4c06356bSdh 
555*4c06356bSdh typedef enum smp_routing_attr {
556*4c06356bSdh 	SMP_ROUTING_DIRECT = 0x0,
557*4c06356bSdh 	SMP_ROUTING_SUBTRACTIVE = 0x1,
558*4c06356bSdh 	SMP_ROUTING_TABLE = 0x2
559*4c06356bSdh } smp_routing_attr_t;
560*4c06356bSdh 
561*4c06356bSdh /*
562*4c06356bSdh  * SAS-2 10.4.3.11 REPORT PHY ERROR LOG
563*4c06356bSdh  */
564*4c06356bSdh typedef struct smp_report_phy_error_log_req {
565*4c06356bSdh 	uint8_t _reserved1[5];
566*4c06356bSdh 	uint8_t srpelr_phy_identifier;
567*4c06356bSdh 	uint8_t _reserved2[2];
568*4c06356bSdh } smp_report_phy_error_log_req_t;
569*4c06356bSdh 
570*4c06356bSdh typedef struct smp_report_phy_error_log_resp {
571*4c06356bSdh 	uint16_t srpelr_exp_change_count;
572*4c06356bSdh 	uint8_t _reserved1[3];
573*4c06356bSdh 	uint8_t srpelr_phy_identifier;
574*4c06356bSdh 	uint8_t _reserved2[2];
575*4c06356bSdh 	uint32_t srpelr_invalid_dword_count;
576*4c06356bSdh 	uint32_t srpelr_running_disparity_error_count;
577*4c06356bSdh 	uint32_t srpelr_loss_dword_sync_count;
578*4c06356bSdh 	uint32_t srpelr_phy_reset_problem_count;
579*4c06356bSdh } smp_report_phy_error_log_resp_t;
580*4c06356bSdh 
581*4c06356bSdh /*
582*4c06356bSdh  * SAS-2 10.4.3.12 REPORT PHY SATA
583*4c06356bSdh  */
584*4c06356bSdh typedef struct smp_report_phy_sata_req {
585*4c06356bSdh 	uint8_t _reserved1[5];
586*4c06356bSdh 	uint8_t srpsr_phy_identifier;
587*4c06356bSdh 	uint8_t srpsr_affiliation_context;
588*4c06356bSdh 	uint8_t _reserved2;
589*4c06356bSdh } smp_report_phy_sata_req_t;
590*4c06356bSdh 
591*4c06356bSdh typedef struct smp_report_phy_sata_resp {
592*4c06356bSdh 	uint16_t srpsr_exp_change_count;
593*4c06356bSdh 	uint8_t _reserved1[3];
594*4c06356bSdh 	uint8_t srpsr_phy_identifier;
595*4c06356bSdh 	uint8_t _reserved2;
596*4c06356bSdh 	DECL_BITFIELD4(
597*4c06356bSdh 	    srpsr_affiliation_valid		:1,
598*4c06356bSdh 	    srpsr_affiliations_supported	:1,
599*4c06356bSdh 	    srpsr_stp_nexus_loss		:1,
600*4c06356bSdh 	    _reserved3				:5);
601*4c06356bSdh 	uint8_t _reserved4[4];
602*4c06356bSdh 	uint64_t srpsr_stp_sas_addr;
603*4c06356bSdh 	uint8_t srpsr_register_device_host_fis[20];
604*4c06356bSdh 	uint8_t _reserved5[4];
605*4c06356bSdh 	uint64_t srpsr_affiliated_stp_init_sas_addr;
606*4c06356bSdh 	uint64_t srpsr_stp_nexus_loss_sas_addr;
607*4c06356bSdh 	uint8_t _reserved6;
608*4c06356bSdh 	uint8_t srpsr_affiliation_context;
609*4c06356bSdh 	uint8_t srpsr_current_affiliation_contexts;
610*4c06356bSdh 	uint8_t srpsr_max_affiliation_contexts;
611*4c06356bSdh } smp_report_phy_sata_resp_t;
612*4c06356bSdh 
613*4c06356bSdh /*
614*4c06356bSdh  * SAS-2 10.4.3.13 REPORT ROUTE INFORMATION
615*4c06356bSdh  */
616*4c06356bSdh typedef struct smp_report_route_info_req {
617*4c06356bSdh 	uint8_t _reserved1[2];
618*4c06356bSdh 	uint16_t srrir_exp_route_index;
619*4c06356bSdh 	uint8_t _reserved2;
620*4c06356bSdh 	uint8_t srrir_phy_identifier;
621*4c06356bSdh 	uint8_t _reserved3[2];
622*4c06356bSdh } smp_report_route_info_req_t;
623*4c06356bSdh 
624*4c06356bSdh typedef struct smp_report_route_info_resp {
625*4c06356bSdh 	uint16_t srrir_exp_change_count;
626*4c06356bSdh 	uint16_t srrir_exp_route_index;
627*4c06356bSdh 	uint8_t _reserved1;
628*4c06356bSdh 	uint8_t srrir_phy_identifier;
629*4c06356bSdh 	uint8_t _reserved2[2];
630*4c06356bSdh 	DECL_BITFIELD2(
631*4c06356bSdh 	    _reserved3				:7,
632*4c06356bSdh 	    srrir_exp_route_entry_disabled	:1);
633*4c06356bSdh 	uint8_t _reserved4[3];
634*4c06356bSdh 	uint64_t srrir_routed_sas_addr;
635*4c06356bSdh 	uint8_t _reserved5[16];
636*4c06356bSdh } smp_report_route_info_resp_t;
637*4c06356bSdh 
638*4c06356bSdh /*
639*4c06356bSdh  * SAS-2 10.4.3.14 SAS-2 REPORT PHY EVENT
640*4c06356bSdh  */
641*4c06356bSdh typedef struct smp_report_phy_event_req {
642*4c06356bSdh 	uint8_t _reserved1;
643*4c06356bSdh 	uint8_t _reserved2[4];
644*4c06356bSdh 	uint8_t srper_phy_identifier;
645*4c06356bSdh 	uint8_t _reserved3[2];
646*4c06356bSdh } smp_report_phy_event_req_t;
647*4c06356bSdh 
648*4c06356bSdh typedef struct smp_phy_event_report_descr {
649*4c06356bSdh 	uint8_t _reserved1[3];
650*4c06356bSdh 	uint8_t sped_phy_event_source;
651*4c06356bSdh 	uint32_t sped_phy_event;
652*4c06356bSdh 	uint32_t sped_peak_detector_threshold;
653*4c06356bSdh } smp_phy_event_report_descr_t;
654*4c06356bSdh 
655*4c06356bSdh typedef struct smp_report_phy_event_resp {
656*4c06356bSdh 	uint16_t srper_exp_change_count;
657*4c06356bSdh 	uint8_t _reserved1[3];
658*4c06356bSdh 	uint8_t srper_phy_identifier;
659*4c06356bSdh 	uint8_t _reserved2[5];
660*4c06356bSdh 	uint8_t srper_n_phy_event_descrs;
661*4c06356bSdh 	smp_phy_event_report_descr_t srper_phy_event_descrs[1];
662*4c06356bSdh } smp_report_phy_event_resp_t;
663*4c06356bSdh 
664*4c06356bSdh /*
665*4c06356bSdh  * SAS-2 10.4.3.15 SAS-2 DISCOVER LIST
666*4c06356bSdh  */
667*4c06356bSdh typedef struct smp_discover_list_req {
668*4c06356bSdh 	uint8_t _reserved1[4];
669*4c06356bSdh 	uint8_t sdlr_starting_phy_identifier;
670*4c06356bSdh 	uint8_t sdlr_max_descrs;
671*4c06356bSdh 	DECL_BITFIELD3(
672*4c06356bSdh 	    sdlr_phy_filter		:4,
673*4c06356bSdh 	    _reserved2			:3,
674*4c06356bSdh 	    sdlr_ignore_zone_group	:1);
675*4c06356bSdh 	DECL_BITFIELD2(
676*4c06356bSdh 	    sdlr_descr_type		:4,
677*4c06356bSdh 	    _reserved3			:4);
678*4c06356bSdh 	uint8_t _reserved4[4];
679*4c06356bSdh 	uint8_t sdlr_vendor[12];
680*4c06356bSdh } smp_discover_list_req_t;
681*4c06356bSdh 
682*4c06356bSdh typedef struct smp_discover_short_descr {
683*4c06356bSdh 	uint8_t sdsd_phy_identifier;
684*4c06356bSdh 	uint8_t sdsd_function_result;
685*4c06356bSdh 	DECL_BITFIELD3(
686*4c06356bSdh 	    sdsd_attached_reason	:4,
687*4c06356bSdh 	    sdsd_attached_device_type	:3,
688*4c06356bSdh 	    _restricted1		:1);
689*4c06356bSdh 	DECL_BITFIELD2(
690*4c06356bSdh 	    sdsd_negotiated_logical_link_rate	:4,	/* smp_link_rate_t */
691*4c06356bSdh 	    _restricted2			:4);
692*4c06356bSdh 	DECL_BITFIELD5(
693*4c06356bSdh 	    sdsd_attached_sata_host	:1,
694*4c06356bSdh 	    sdsd_attached_smp_initiator	:1,
695*4c06356bSdh 	    sdsd_attached_stp_initiator	:1,
696*4c06356bSdh 	    sdsd_attached_ssp_initiator	:1,
697*4c06356bSdh 	    _restricted3		:4);
698*4c06356bSdh 	DECL_BITFIELD6(
699*4c06356bSdh 	    sdsd_attached_sata_device		:1,
700*4c06356bSdh 	    sdsd_attached_smp_target		:1,
701*4c06356bSdh 	    sdsd_attached_stp_target		:1,
702*4c06356bSdh 	    sdsd_attached_ssp_target		:1,
703*4c06356bSdh 	    _restricted4			:3,
704*4c06356bSdh 	    sdsd_attached_sata_port_selector	:1);
705*4c06356bSdh 	DECL_BITFIELD3(
706*4c06356bSdh 	    sdsd_routing_attribute	:4,		/* smp_routing_attr_t */
707*4c06356bSdh 	    _reserved1			:3,
708*4c06356bSdh 	    sdsd_virtual_phy		:1);
709*4c06356bSdh 	DECL_BITFIELD2(
710*4c06356bSdh 	    _reserved2			:4,
711*4c06356bSdh 	    sdsd_reason			:4);
712*4c06356bSdh 	uint8_t sdsd_zone_group;
713*4c06356bSdh 	DECL_BITFIELD7(
714*4c06356bSdh 	    _reserved3				:1,
715*4c06356bSdh 	    sdsd_inside_zpsds			:1,
716*4c06356bSdh 	    sdsd_zone_group_persistent		:1,
717*4c06356bSdh 	    _reserved4				:1,
718*4c06356bSdh 	    sdsd_requested_insize_zpsds		:1,
719*4c06356bSdh 	    sdsd_inside_zpsds_persistent	:1,
720*4c06356bSdh 	    _restricted5			:2);
721*4c06356bSdh 	uint8_t sdsd_attached_phy_identifier;
722*4c06356bSdh 	uint8_t sdsd_phy_change_count;
723*4c06356bSdh 	uint64_t sdsd_attached_sas_addr;
724*4c06356bSdh 	uint8_t _reserved5[4];
725*4c06356bSdh } smp_discover_short_descr_t;
726*4c06356bSdh 
727*4c06356bSdh typedef struct smp_discover_long_descr {
728*4c06356bSdh 	uint8_t _reserved1[2];
729*4c06356bSdh 	uint8_t sdld_function_result;
730*4c06356bSdh 	uint8_t _reserved2[1];
731*4c06356bSdh 	smp_discover_resp_t sdld_response;
732*4c06356bSdh } smp_discover_long_descr_t;
733*4c06356bSdh 
734*4c06356bSdh #define	SMP_DISCOVER_RESP(_ld)	\
735*4c06356bSdh 	(((smp_discover_long_descr_t *)(_ld))->sdld_function_result ==	\
736*4c06356bSdh 	SMP_FUNCTION_ACCEPTED ?	\
737*4c06356bSdh 	&((smp_discover_long_descr_t *)(_ld))->sdld_response :	\
738*4c06356bSdh 	NULL)
739*4c06356bSdh 
740*4c06356bSdh typedef struct smp_discover_list_resp {
741*4c06356bSdh 	uint16_t sdlr_exp_change_count;
742*4c06356bSdh 	uint8_t _reserved1[2];
743*4c06356bSdh 	uint8_t sdlr_starting_phy_identifier;
744*4c06356bSdh 	uint8_t sdlr_n_descrs;
745*4c06356bSdh 	DECL_BITFIELD2(
746*4c06356bSdh 	    sdlr_phy_filter		:4,
747*4c06356bSdh 	    _reserved2			:4);
748*4c06356bSdh 	DECL_BITFIELD2(
749*4c06356bSdh 	    sdlr_descr_type		:4,
750*4c06356bSdh 	    _reserved3			:4);
751*4c06356bSdh 	uint8_t sdlr_descr_length;
752*4c06356bSdh 	uint8_t _reserved4[3];
753*4c06356bSdh 	DECL_BITFIELD5(
754*4c06356bSdh 	    sdlr_externally_configurable_route_table	:1,
755*4c06356bSdh 	    sdlr_configuring				:1,
756*4c06356bSdh 	    _reserved5					:4,
757*4c06356bSdh 	    sdlr_zoning_enabled				:1,
758*4c06356bSdh 	    sdlr_zoning_supported			:1);
759*4c06356bSdh 	uint8_t _reserved6;
760*4c06356bSdh 	uint16_t sdlr_last_sc_status_descr_index;
761*4c06356bSdh 	uint16_t sdlr_last_phy_event_list_descr_index;
762*4c06356bSdh 	uint8_t _reserved7[10];
763*4c06356bSdh 	uint8_t sdlr_vendor[16];
764*4c06356bSdh 	uint8_t sdlr_descrs[1];	/* short or long format */
765*4c06356bSdh } smp_discover_list_resp_t;
766*4c06356bSdh 
767*4c06356bSdh /*
768*4c06356bSdh  * SAS-2 10.4.3.16 REPORT PHY EVENT LIST
769*4c06356bSdh  */
770*4c06356bSdh typedef struct smp_report_phy_event_list_req {
771*4c06356bSdh 	uint8_t _reserved1[2];
772*4c06356bSdh 	uint16_t srpelr_starting_descr_index;
773*4c06356bSdh } smp_report_phy_event_list_req_t;
774*4c06356bSdh 
775*4c06356bSdh typedef struct smp_phy_event_list_descr {
776*4c06356bSdh 	uint8_t _reserved1[2];
777*4c06356bSdh 	uint8_t speld_phy_identifier;
778*4c06356bSdh 	uint8_t speld_phy_event_source;
779*4c06356bSdh 	uint32_t speld_phy_event;
780*4c06356bSdh 	uint32_t speld_peak_detector_threshold;
781*4c06356bSdh } smp_phy_event_list_descr_t;
782*4c06356bSdh 
783*4c06356bSdh typedef struct smp_report_phy_event_list_resp {
784*4c06356bSdh 	uint16_t srpelr_exp_change_count;
785*4c06356bSdh 	uint16_t srpelr_starting_descr_index;
786*4c06356bSdh 	uint16_t srpelr_last_descr_index;
787*4c06356bSdh 	uint8_t srpelr_phy_event_list_descr_length;
788*4c06356bSdh 	uint8_t _reserved1[3];
789*4c06356bSdh 	uint8_t srpelr_n_descrs;
790*4c06356bSdh 	smp_phy_event_list_descr_t srpelr_descrs[1];
791*4c06356bSdh } smp_report_phy_event_list_resp_t;
792*4c06356bSdh 
793*4c06356bSdh /*
794*4c06356bSdh  * SAS-2 10.4.3.17 REPORT EXPANDER ROUTE TABLE LIST
795*4c06356bSdh  */
796*4c06356bSdh typedef struct smp_report_exp_route_table_list_req {
797*4c06356bSdh 	uint8_t _reserved1[4];
798*4c06356bSdh 	uint16_t srertlr_max_descrs;
799*4c06356bSdh 	uint16_t srertlr_starting_routed_sas_addr_index;
800*4c06356bSdh 	uint8_t _reserved2[7];
801*4c06356bSdh 	uint8_t srertlr_starting_phy_identifier;
802*4c06356bSdh 	uint8_t _reserved3[8];
803*4c06356bSdh } smp_report_exp_route_table_list_req_t;
804*4c06356bSdh 
805*4c06356bSdh typedef struct smp_route_table_descr {
806*4c06356bSdh 	uint64_t srtd_routed_sas_addr;
807*4c06356bSdh 	uint8_t srtd_phy_bitmap[6];
808*4c06356bSdh 	DECL_BITFIELD2(
809*4c06356bSdh 	    _reserved1			:7,
810*4c06356bSdh 	    srtd_zone_group_valid	:1);
811*4c06356bSdh 	uint8_t srtd_zone_group;
812*4c06356bSdh } smp_route_table_descr_t;
813*4c06356bSdh 
814*4c06356bSdh #define	SMP_ROUTE_PHY(_d, _s, _i)	\
815*4c06356bSdh 	((_d)->srtd_phy_bitmap[(48 - (_i) + (_s)) >> 3] & \
816*4c06356bSdh 	(1 << ((48 - (_i) + (_s)) & 7)))
817*4c06356bSdh 
818*4c06356bSdh typedef struct smp_report_exp_route_table_list_resp {
819*4c06356bSdh 	uint16_t srertlr_exp_change_count;
820*4c06356bSdh 	uint16_t srertlr_route_table_change_count;
821*4c06356bSdh 	DECL_BITFIELD3(
822*4c06356bSdh 	    _reserved1		:1,
823*4c06356bSdh 	    srertlr_configuring	:1,
824*4c06356bSdh 	    _reserved2		:6);
825*4c06356bSdh 	uint8_t _reserved3;
826*4c06356bSdh 	uint16_t srertlr_n_descrs;
827*4c06356bSdh 	uint16_t srertlr_first_routed_sas_addr_index;
828*4c06356bSdh 	uint16_t srertlr_last_routed_sas_addr_index;
829*4c06356bSdh 	uint8_t _reserved4[3];
830*4c06356bSdh 	uint8_t srertlr_starting_phy_identifier;
831*4c06356bSdh 	uint8_t _reserved5[12];
832*4c06356bSdh 	smp_route_table_descr_t srertlr_descrs[1];
833*4c06356bSdh } smp_report_exp_route_table_list_resp_t;
834*4c06356bSdh 
835*4c06356bSdh /*
836*4c06356bSdh  * SAS-2 10.4.3.18 CONFIGURE GENERAL (no additional response)
837*4c06356bSdh  */
838*4c06356bSdh typedef struct smp_config_general_req {
839*4c06356bSdh 	uint16_t scgr_expected_exp_change_count;
840*4c06356bSdh 	uint8_t _reserved1[2];
841*4c06356bSdh 	DECL_BITFIELD6(
842*4c06356bSdh 	    scgr_update_stp_bus_inactivity			:1,
843*4c06356bSdh 	    scgr_update_stp_max_conn				:1,
844*4c06356bSdh 	    scgr_update_stp_smp_nexus_loss			:1,
845*4c06356bSdh 	    scgr_update_initial_time_to_reduced_functionality	:1,
846*4c06356bSdh 	    scgr_update_stp_reject_to_open			:1,
847*4c06356bSdh 	    _reserved2						:3);
848*4c06356bSdh 	uint8_t _reserved3;
849*4c06356bSdh 	uint16_t scgr_stp_bus_inactivity;
850*4c06356bSdh 	uint16_t scgr_stp_max_conn;
851*4c06356bSdh 	uint16_t scgr_stp_smp_nexus_loss;
852*4c06356bSdh 	uint8_t scgr_initial_time_to_reduced_functionality;
853*4c06356bSdh 	uint8_t _reserved4;
854*4c06356bSdh 	uint16_t scgr_stp_reject_to_open;
855*4c06356bSdh } smp_config_general_req_t;
856*4c06356bSdh 
857*4c06356bSdh /*
858*4c06356bSdh  * SAS-2 10.4.3.19 ENABLE DISABLE ZONING (no additional response)
859*4c06356bSdh  */
860*4c06356bSdh typedef struct smp_enable_disable_zoning_req {
861*4c06356bSdh 	uint16_t sedzr_expected_exp_change_count;
862*4c06356bSdh 	DECL_BITFIELD2(
863*4c06356bSdh 	    sedzr_save	:2,		/* smp_zoning_save_t */
864*4c06356bSdh 	    _reserved1	:6);
865*4c06356bSdh 	uint8_t _reserved2;
866*4c06356bSdh 	DECL_BITFIELD2(
867*4c06356bSdh 	    sedzr_enable_disable_zoning	:2,
868*4c06356bSdh 	    _reserved3			:6);
869*4c06356bSdh 	uint8_t _reserved4[3];
870*4c06356bSdh } smp_enable_disable_zoning_req_t;
871*4c06356bSdh 
872*4c06356bSdh typedef enum smp_zoning_save {
873*4c06356bSdh 	SMP_ZONING_SAVE_CURRENT = 0x0,
874*4c06356bSdh 	SMP_ZONING_SAVE_SAVED = 0x1,
875*4c06356bSdh 	SMP_ZONING_SAVE_BOTH_IF_SUPP = 0x2,
876*4c06356bSdh 	SMP_ZONING_SAVE_BOTH = 0x3
877*4c06356bSdh } smp_zoning_save_t;
878*4c06356bSdh 
879*4c06356bSdh typedef enum smp_zoning_enable_op {
880*4c06356bSdh 	SMP_ZONING_ENABLE_OP_NONE = 0x0,
881*4c06356bSdh 	SMP_ZONING_ENABLE_OP_ENABLE = 0x1,
882*4c06356bSdh 	SMP_ZONING_ENABLE_OP_DISABLE = 0x2
883*4c06356bSdh } smp_zoning_enable_op_t;
884*4c06356bSdh 
885*4c06356bSdh /*
886*4c06356bSdh  * SAS-2 10.4.3.20 ZONED BROADCAST (no additional response)
887*4c06356bSdh  */
888*4c06356bSdh typedef struct smp_zoned_broadcast_req {
889*4c06356bSdh 	uint8_t _restricted1[2];
890*4c06356bSdh 	DECL_BITFIELD2(
891*4c06356bSdh 	    szbr_broadcast_type	:4,
892*4c06356bSdh 	    _reserved		:4);
893*4c06356bSdh 	uint8_t szbr_n_broadcast_source_zone_groups;
894*4c06356bSdh 	uint8_t szbr_broadcast_source_zone_groups[1];
895*4c06356bSdh } smp_zoned_broadcast_req_t;
896*4c06356bSdh 
897*4c06356bSdh /*
898*4c06356bSdh  * SAS-2 10.4.3.21 ZONE LOCK
899*4c06356bSdh  */
900*4c06356bSdh typedef struct smp_zone_lock_req {
901*4c06356bSdh 	uint16_t szlr_expected_exp_change_count;
902*4c06356bSdh 	uint16_t szlr_zone_lock_inactivity_timeout;
903*4c06356bSdh 	uint8_t szlr_zone_manager_password[32];
904*4c06356bSdh } smp_zone_lock_req_t;
905*4c06356bSdh 
906*4c06356bSdh typedef struct smp_zone_lock_resp {
907*4c06356bSdh 	uint8_t _reserved1[4];
908*4c06356bSdh 	uint64_t szlr_active_zone_manager_sas_addr;
909*4c06356bSdh } smp_zone_lock_resp_t;
910*4c06356bSdh 
911*4c06356bSdh /*
912*4c06356bSdh  * SAS-2 10.4.3.22 ZONE ACTIVATE (no additional response)
913*4c06356bSdh  */
914*4c06356bSdh typedef struct smp_zone_activate_req {
915*4c06356bSdh 	uint16_t szar_expected_exp_change_count;
916*4c06356bSdh 	uint8_t _reserved1[2];
917*4c06356bSdh } smp_zone_activate_req_t;
918*4c06356bSdh 
919*4c06356bSdh /*
920*4c06356bSdh  * SAS-2 10.4.3.23 ZONE UNLOCK (no additional response)
921*4c06356bSdh  */
922*4c06356bSdh typedef struct smp_zone_unlock_req {
923*4c06356bSdh 	uint8_t _restricted1[2];
924*4c06356bSdh 	DECL_BITFIELD2(
925*4c06356bSdh 	    szur_activate_required	:1,
926*4c06356bSdh 	    _reserved1			:7);
927*4c06356bSdh 	uint8_t _reserved2;
928*4c06356bSdh } smp_zone_unlock_req_t;
929*4c06356bSdh 
930*4c06356bSdh /*
931*4c06356bSdh  * SAS-2 10.4.3.24 CONFIGURE ZONE MANAGER PASSWORD (no additional response)
932*4c06356bSdh  */
933*4c06356bSdh typedef struct smp_config_zone_manager_password_req {
934*4c06356bSdh 	uint16_t sczmpr_expected_exp_change_count;
935*4c06356bSdh 	DECL_BITFIELD2(
936*4c06356bSdh 	    sczmpr_save		:2,		/* smp_zoning_save_t */
937*4c06356bSdh 	    _reserved1		:6);
938*4c06356bSdh 	uint8_t _reserved2;
939*4c06356bSdh 	uint8_t sczmpr_zone_manager_password[32];
940*4c06356bSdh 	uint8_t sczmpr_new_zone_manager_password[32];
941*4c06356bSdh } smp_config_zone_manager_password_req_t;
942*4c06356bSdh 
943*4c06356bSdh /*
944*4c06356bSdh  * SAS-2 10.4.3.25 CONFIGURE ZONE PHY INFORMATION (no additional response)
945*4c06356bSdh  */
946*4c06356bSdh typedef struct smp_zone_phy_config_descr {
947*4c06356bSdh 	uint8_t szpcd_phy_identifier;
948*4c06356bSdh 	DECL_BITFIELD6(
949*4c06356bSdh 	    _reserved1				:2,
950*4c06356bSdh 	    szpcd_zone_group_persistent		:1,
951*4c06356bSdh 	    _reserved2				:1,
952*4c06356bSdh 	    szpcd_requested_inside_zpsds	:1,
953*4c06356bSdh 	    szpcd_inside_zpsds_persistent	:1,
954*4c06356bSdh 	    _reserved3				:2);
955*4c06356bSdh 	uint8_t _reserved4;
956*4c06356bSdh 	uint8_t szpcd_zone_group;
957*4c06356bSdh } smp_zone_phy_config_descr_t;
958*4c06356bSdh 
959*4c06356bSdh typedef struct smp_config_zone_phy_info_req {
960*4c06356bSdh 	uint16_t sczpir_expected_exp_change_count;
961*4c06356bSdh 	DECL_BITFIELD2(
962*4c06356bSdh 	    sczpir_save		:2,		/* smp_zoning_save_t */
963*4c06356bSdh 	    _reserved1		:6);
964*4c06356bSdh 	uint8_t sczpir_n_descrs;
965*4c06356bSdh 	smp_zone_phy_config_descr_t sczpir_descrs[1];
966*4c06356bSdh } smp_config_zone_phy_info_req_t;
967*4c06356bSdh 
968*4c06356bSdh /*
969*4c06356bSdh  * SAS-2 10.4.3.26 CONFIGURE ZONE PERMISSION TABLE (no additional response)
970*4c06356bSdh  */
971*4c06356bSdh typedef struct smp_config_zone_perm_table_req {
972*4c06356bSdh 	uint16_t sczptr_expected_exp_change_count;
973*4c06356bSdh 	uint8_t sczptr_starting_source_zone_group;
974*4c06356bSdh 	uint8_t sczptr_n_descrs;
975*4c06356bSdh 	DECL_BITFIELD3(
976*4c06356bSdh 	    sczptr_save			:2,	/* smp_zoning_save_t */
977*4c06356bSdh 	    _reserved1			:4,
978*4c06356bSdh 	    sczptr_n_zone_groups	:2);	/* smp_n_zone_grps_t */
979*4c06356bSdh 	uint8_t _reserved2[7];
980*4c06356bSdh 	uint8_t sczptr_descrs[1];	/* smp_zone_perm_descrXXX_t */
981*4c06356bSdh } smp_config_zone_perm_table_req_t;
982*4c06356bSdh 
983*4c06356bSdh /*
984*4c06356bSdh  * SAS-2 10.4.3.27 CONFIGURE ROUTE INFORMATION (no additional response)
985*4c06356bSdh  */
986*4c06356bSdh typedef struct smp_config_route_info_req {
987*4c06356bSdh 	uint16_t scrir_expected_exp_change_count;
988*4c06356bSdh 	uint16_t scrir_exp_route_index;
989*4c06356bSdh 	uint8_t _reserved1;
990*4c06356bSdh 	uint8_t scrir_phy_identifier;
991*4c06356bSdh 	uint8_t _reserved2[2];
992*4c06356bSdh 	DECL_BITFIELD2(
993*4c06356bSdh 	    _reserved3				:7,
994*4c06356bSdh 	    scrir_disable_exp_route_entry	:1);
995*4c06356bSdh 	uint8_t _reserved4[3];
996*4c06356bSdh 	uint64_t scrir_routed_sas_addr;
997*4c06356bSdh 	uint8_t _reserved5[16];
998*4c06356bSdh } smp_config_route_info_req_t;
999*4c06356bSdh 
1000*4c06356bSdh /*
1001*4c06356bSdh  * SAS-2 10.4.3.28 PHY CONTROL (no additional response)
1002*4c06356bSdh  */
1003*4c06356bSdh typedef struct smp_phy_control_req {
1004*4c06356bSdh 	uint16_t spcr_expected_exp_change_count;
1005*4c06356bSdh 	uint8_t _reserved1[3];
1006*4c06356bSdh 	uint8_t spcr_phy_identifier;
1007*4c06356bSdh 	uint8_t spcr_phy_operation;
1008*4c06356bSdh 	DECL_BITFIELD2(
1009*4c06356bSdh 	    spcr_update_partial_pwy_timeout	:1,
1010*4c06356bSdh 	    _reserved2				:7);
1011*4c06356bSdh 	uint8_t _reserved3[12];
1012*4c06356bSdh 	uint64_t spcr_attached_device_name;
1013*4c06356bSdh 	DECL_BITFIELD2(
1014*4c06356bSdh 	    _reserved4				:4,
1015*4c06356bSdh 	    spcr_prog_min_phys_link_rate	:4);	/* smp_link_rate_t */
1016*4c06356bSdh 	DECL_BITFIELD2(
1017*4c06356bSdh 	    _reserved5				:4,
1018*4c06356bSdh 	    spcr_prog_max_phys_link_rate	:4);	/* smp_link_rate_t */
1019*4c06356bSdh 	uint8_t _reserved6[2];
1020*4c06356bSdh 	DECL_BITFIELD2(
1021*4c06356bSdh 	    spcr_partial_pwy_timeout	:4,
1022*4c06356bSdh 	    _reserved7			:4);
1023*4c06356bSdh 	uint8_t _reserved8[3];
1024*4c06356bSdh } smp_phy_control_req_t;
1025*4c06356bSdh 
1026*4c06356bSdh typedef enum smp_phy_op {
1027*4c06356bSdh 	SMP_PHY_OP_NOP = 0x00,
1028*4c06356bSdh 	SMP_PHY_OP_LINK_RESET = 0x01,
1029*4c06356bSdh 	SMP_PHY_OP_HARD_RESET = 0x02,
1030*4c06356bSdh 	SMP_PHY_OP_DISABLE = 0x03,
1031*4c06356bSdh 	SMP_PHY_OP_CLEAR_ERROR_LOG = 0x05,
1032*4c06356bSdh 	SMP_PHY_OP_CLEAR_AFFILIATION = 0x06,
1033*4c06356bSdh 	SMP_PHY_OP_TRANSMIT_SATA_PORT_SELECTION_SIGNAL = 0x07,
1034*4c06356bSdh 	SMP_PHY_OP_CLEAR_STP_NEXUS_LOSS = 0x08,
1035*4c06356bSdh 	SMP_PHY_OP_SET_ATTACHED_DEVICE_NAME = 0x09
1036*4c06356bSdh } smp_phy_op_t;
1037*4c06356bSdh 
1038*4c06356bSdh /*
1039*4c06356bSdh  * SAS-2 10.4.3.29 PHY TEST FUNCTION (no additional response)
1040*4c06356bSdh  */
1041*4c06356bSdh typedef struct smp_phy_test_function_req {
1042*4c06356bSdh 	uint16_t sptfr_expected_exp_change_count;
1043*4c06356bSdh 	uint8_t _reserved1[3];
1044*4c06356bSdh 	uint8_t sptfr_phy_identifier;
1045*4c06356bSdh 	uint8_t sptfr_phy_test_function;
1046*4c06356bSdh 	uint8_t sptfr_phy_test_pattern;		/* smp_phy_test_function_t */
1047*4c06356bSdh 	uint8_t _reserved2[3];
1048*4c06356bSdh 	DECL_BITFIELD4(
1049*4c06356bSdh 	    sptfr_test_pattern_phys_link_rate	:4,	/* smp_link_rate_t */
1050*4c06356bSdh 	    sptfr_test_pattern_ssc		:2,
1051*4c06356bSdh 	    sptfr_test_pattern_sata		:1,
1052*4c06356bSdh 	    _reserved3				:1);
1053*4c06356bSdh 	uint8_t _reserved4[3];
1054*4c06356bSdh 	uint8_t sptfr_phy_test_pattern_dwords_ctl;
1055*4c06356bSdh 	uint8_t sptfr_phy_test_pattern_dwords[8];
1056*4c06356bSdh 	uint8_t _reserved5[12];
1057*4c06356bSdh } smp_phy_test_function_req_t;
1058*4c06356bSdh 
1059*4c06356bSdh typedef enum smp_phy_test_function {
1060*4c06356bSdh 	SMP_PHY_TEST_FN_STOP = 0x00,
1061*4c06356bSdh 	SMP_PHY_TEST_FN_TRANSMIT_PATTERN = 0x01
1062*4c06356bSdh } smp_phy_test_function_t;
1063*4c06356bSdh 
1064*4c06356bSdh /*
1065*4c06356bSdh  * SAS-2 10.4.3.30 CONFIGURE PHY EVENT (no additional response)
1066*4c06356bSdh  */
1067*4c06356bSdh typedef struct smp_phy_event_config_descr {
1068*4c06356bSdh 	uint8_t _reserved1[3];
1069*4c06356bSdh 	uint8_t specd_phy_event_source;
1070*4c06356bSdh 	uint32_t specd_peak_value_detector_threshold;
1071*4c06356bSdh } smp_phy_event_config_descr_t;
1072*4c06356bSdh 
1073*4c06356bSdh typedef struct smp_config_phy_event_req {
1074*4c06356bSdh 	uint16_t scper_expected_exp_change_count;
1075*4c06356bSdh 	DECL_BITFIELD2(
1076*4c06356bSdh 	    scper_clear_peaks	:1,
1077*4c06356bSdh 	    _reserved1		:7);
1078*4c06356bSdh 	uint8_t _reserved2[2];
1079*4c06356bSdh 	uint8_t scper_phy_identifier;
1080*4c06356bSdh 	uint8_t _reserved3;
1081*4c06356bSdh 	uint8_t scper_n_descrs;
1082*4c06356bSdh 	smp_phy_event_config_descr_t scper_descrs[1];
1083*4c06356bSdh } smp_config_phy_event_req_t;
1084*4c06356bSdh 
1085936b7af6Sjw #pragma	pack()
1086936b7af6Sjw 
1087936b7af6Sjw #ifdef	__cplusplus
1088936b7af6Sjw }
1089936b7af6Sjw #endif
1090936b7af6Sjw 
1091*4c06356bSdh #endif	/* _SYS_SCSI_GENERIC_SMP_FRAMES_H */
1092