/*
* 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
*
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* SAS Common Structures and Definitions
* sas2r14, simplified/reduced
*/
#ifndef _SAS_H
#define _SAS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/sysmacros.h>
/*
* SAS Address Frames
* Trailing 4 byte CRC not included.
*/
typedef struct {
device_type :3,
reserved0 :1);
reason :4,
reserved1 :4);
restricted0 :1,
smp_ini_port :1,
stp_ini_port :1,
ssp_ini_port :1,
reserved2 :4);
restricted1 :1,
smp_tgt_port :1,
stp_tgt_port :1,
ssp_tgt_port :1,
reserved3 :4);
reserved4 :5);
typedef struct {
protocol :3,
ini_port :1);
connection_rate :4,
features :4);
#define SAS_AF_IDENTIFY 0
#define SAS_OF_PROTO_SMP 0
/*
* SSP Definitions
*/
typedef struct {
task_attribute :2,
command_priority :4,
enable_first_burst :1);
reserved2 :2,
addi_cdb_len :6);
/* additional cdb bytes go here, followed by 4 byte CRC */
typedef struct {
datapres :2,
reserved1 :6);
/* response data followed by sense data goes here */
/* length of bytes up to response data */
/*
* When the RSP IU is type RESPONSE_DATA,
* the first 4 bytes of response data should
* be a Big Endian representation of one of
* these codes.
*/
/*
* Task Management Functions- should be in a SAM definition file
*/
/*
* PHY size changed from SAS1.1 to SAS2.
*/
/*
* Maximum SMP payload size, including CRC
*/
#ifdef __cplusplus
}
#endif
#endif /* _SAS_H */