Annotation of embedaddon/smartmontools/csmisas.h, revision 1.1
1.1 ! misho 1: /**************************************************************************
! 2:
! 3: Module Name:
! 4:
! 5: CSMISAS.H
! 6:
! 7:
! 8: Abstract:
! 9:
! 10: This file contains constants and data structure definitions used by drivers
! 11: that support the Common Storage Management Interface specification for
! 12: SAS or SATA in either the Windows or Linux.
! 13:
! 14: This should be considered as a reference implementation only. Changes may
! 15: be necessary to accommodate a specific build environment or target OS.
! 16:
! 17: Revision History:
! 18:
! 19: 001 SEF 8/12/03 Initial release.
! 20: 002 SEF 8/20/03 Cleanup to match documentation.
! 21: 003 SEF 9/12/03 Additional cleanup, created combined header
! 22: 004 SEF 9/23/03 Changed base types to match linux defaults
! 23: Added RAID signature
! 24: Added bControllerFlags to CSMI_SAS_CNTLR_CONFIG
! 25: Changed CSMI_SAS_BEGIN_PACK to 8 for common structures
! 26: Fixed other typos identified in first compilation test
! 27: 005 SEF 10/03/03 Additions to match first version of CSMI document
! 28: 006 SEF 10/14/03 Fixed typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER
! 29: Added defines for bConnectionRate
! 30: 007 SEF 10/15/03 Added Firmware Download Control Code and support
! 31: Added CSMI revision support
! 32: 008 SEF 10/30/03 No functional change, just updated version to track
! 33: spec changes
! 34: 009 SEF 12/09/03 No functional change, just updated version to track
! 35: spec changes
! 36: 010 SEF 3/11/04 Fixed typedef struct CSMI_SAS_RAID_DRIVES to include the
! 37: bFirmware member that is defined in the spec, but
! 38: was missing in this file,
! 39: added CC_CSMI_SAS_TASK_MANAGEMENT
! 40: 011 SEF 4/02/04 No functional change, added comment line before
! 41: CC_CSMI_SAS_TASK_MANAGEMENT
! 42: 012 SEF 4/16/04 Added IOControllerNumber to linux header,
! 43: Modified linux control codes to have upper word of
! 44: 0xCC77.... to indicate CSMI version 77
! 45: Added bSignalClass to CC_CSMI_SET_PHY_INFO
! 46: Added CC_CSMI_SAS_PHY_CONTROL support
! 47: 013 SEF 5/14/04 Added CC_CSMI_SAS_GET_CONNECTOR_INFO support
! 48: 014 SEF 5/24/04 No functional change, just updated version to track spec
! 49: changes
! 50: 015 SEF 6/16/04 changed bPinout to uPinout to reflect proper size,
! 51: changed width of bLocation defines to reflect size
! 52: 016 SEF 6/17/04 changed bLengthOfControls in CSMI_SAS_PHY_CONTROL
! 53: to be proper size
! 54: 017 SEF 9/17/04 added CSMI_SAS_SATA_PORT_SELECTOR,
! 55: CSMI_SAS_LINK_VIRTUAL, CSMI_SAS_CON_NOT_PRESENT, and
! 56: CSMI_SAS_CON_NOT_CONNECTED
! 57: 018 SEF 9/20/04 added CSMI_SAS_PHY_USER_PATTERN,
! 58: changed definition of CSMI_SAS_PHY_FIXED_PATTERN to not
! 59: conflict with activate definition
! 60: 019 SEF 12/06/04 added CSMI_SAS_GET_LOCATION
! 61: added bSSPStatus to CSMI_SAS_SSP_PASSTHRU_STATUS
! 62: structure
! 63: 020 SEF 5/25/05 added CSMI_SAS_PHY_VIRTUAL_SMP, and changes to
! 64: CSMI_SAS_GET_LOCATION
! 65: 021 SEF 11/03/05 added new RAID creation functionality
! 66: 022 SEF 2/01/06 corrected typo bNegotitiatedLInkRate
! 67: Added two more RAID_TYPES, 7 and 8
! 68: 023 SEF 4/04/06 added CSMI_RAID_TYPE_1E
! 69: changed structures that contained surface scan
! 70: to priority approach rather than time, causes
! 71: 0.89 to incompatible with 0.87, so a version
! 72: check is necessary when interpreting the
! 73: raid structures
! 74: Added netware section
! 75: 024 DRG 5/22/06 Added uFailureCode to CSMI_SAS_RAID_CONFIG and
! 76: CSMI_SAS_RAID_FEATURES
! 77: Changed __u64 fields to high and low __u32 fields in
! 78: order to avoid backward compatibility issues with
! 79: packing and alignment.
! 80: Fixed alignment problem in CSMI_SAS_RAID_DRIVES.
! 81: Added CSMI_SAS_CNTLR_SMART_ARRAY to uControllerFlags
! 82: Reassigned the value of CSMI_SAS_CNTLR_RAID_CFG_SUPPORT
! 83: to avoid a conflict.
! 84:
! 85: **************************************************************************/
! 86:
! 87: #ifndef _CSMI_SAS_H_
! 88: #define _CSMI_SAS_H_
! 89:
! 90: // CSMI Specification Revision, the intent is that all versions of the
! 91: // specification will be backward compatible after the 1.00 release.
! 92: // Major revision number, corresponds to xxxx. of CSMI specification
! 93: // Minor revision number, corresponds to .xxxx of CSMI specification
! 94: #define CSMI_MAJOR_REVISION 0
! 95: #define CSMI_MINOR_REVISION 90
! 96:
! 97: /*************************************************************************/
! 98: /* PATCHES FOR TYPOS */
! 99: /*************************************************************************/
! 100:
! 101: #define bNegotitiatedLInkRate bNegotiatedLinkRate
! 102:
! 103: /*************************************************************************/
! 104: /* TARGET OS LINUX SPECIFIC CODE */
! 105: /*************************************************************************/
! 106:
! 107: // EDM #ifdef _linux
! 108: #ifdef __KERNEL__
! 109:
! 110: // Linux base types
! 111:
! 112: #include <linux/types.h>
! 113:
! 114: #define __i8 char
! 115:
! 116: // pack definition
! 117:
! 118: // EDM #define CSMI_SAS_BEGIN_PACK(x) pack(x)
! 119: // EDM #define CSMI_SAS_END_PACK pack()
! 120:
! 121: // IOCTL Control Codes
! 122: // (IoctlHeader.ControlCode)
! 123:
! 124: // Control Codes prior to 0.77
! 125:
! 126: // Control Codes requiring CSMI_ALL_SIGNATURE
! 127:
! 128: // #define CC_CSMI_SAS_GET_DRIVER_INFO 0x12345678
! 129: // #define CC_CSMI_SAS_GET_CNTLR_CONFIG 0x23456781
! 130: // #define CC_CSMI_SAS_GET_CNTLR_STATUS 0x34567812
! 131: // #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0x92345678
! 132:
! 133: // Control Codes requiring CSMI_RAID_SIGNATURE
! 134:
! 135: // #define CC_CSMI_SAS_GET_RAID_INFO 0x45678123
! 136: // #define CC_CSMI_SAS_GET_RAID_CONFIG 0x56781234
! 137:
! 138: // Control Codes requiring CSMI_SAS_SIGNATURE
! 139:
! 140: // #define CC_CSMI_SAS_GET_PHY_INFO 0x67812345
! 141: // #define CC_CSMI_SAS_SET_PHY_INFO 0x78123456
! 142: // #define CC_CSMI_SAS_GET_LINK_ERRORS 0x81234567
! 143: // #define CC_CSMI_SAS_SMP_PASSTHRU 0xA1234567
! 144: // #define CC_CSMI_SAS_SSP_PASSTHRU 0xB1234567
! 145: // #define CC_CSMI_SAS_STP_PASSTHRU 0xC1234567
! 146: // #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xD1234567
! 147: // #define CC_CSMI_SAS_GET_SCSI_ADDRESS 0xE1234567
! 148: // #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xF1234567
! 149: // #define CC_CSMI_SAS_TASK_MANAGEMENT 0xA2345678
! 150:
! 151: // Control Codes for 0.77 and later
! 152:
! 153: // Control Codes requiring CSMI_ALL_SIGNATURE
! 154:
! 155: #define CC_CSMI_SAS_GET_DRIVER_INFO 0xCC770001
! 156: #define CC_CSMI_SAS_GET_CNTLR_CONFIG 0xCC770002
! 157: #define CC_CSMI_SAS_GET_CNTLR_STATUS 0xCC770003
! 158: #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0xCC770004
! 159:
! 160: // Control Codes requiring CSMI_RAID_SIGNATURE
! 161:
! 162: #define CC_CSMI_SAS_GET_RAID_INFO 0xCC77000A
! 163: #define CC_CSMI_SAS_GET_RAID_CONFIG 0xCC77000B
! 164: #define CC_CSMI_SAS_GET_RAID_FEATURES 0xCC77000C
! 165: #define CC_CSMI_SAS_SET_RAID_CONTROL 0xCC77000D
! 166: #define CC_CSMI_SAS_GET_RAID_ELEMENT 0xCC77000E
! 167: #define CC_CSMI_SAS_SET_RAID_OPERATION 0xCC77000F
! 168:
! 169: // Control Codes requiring CSMI_SAS_SIGNATURE
! 170:
! 171: #define CC_CSMI_SAS_GET_PHY_INFO 0xCC770014
! 172: #define CC_CSMI_SAS_SET_PHY_INFO 0xCC770015
! 173: #define CC_CSMI_SAS_GET_LINK_ERRORS 0xCC770016
! 174: #define CC_CSMI_SAS_SMP_PASSTHRU 0xCC770017
! 175: #define CC_CSMI_SAS_SSP_PASSTHRU 0xCC770018
! 176: #define CC_CSMI_SAS_STP_PASSTHRU 0xCC770019
! 177: #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xCC770020
! 178: #define CC_CSMI_SAS_GET_SCSI_ADDRESS 0xCC770021
! 179: #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xCC770022
! 180: #define CC_CSMI_SAS_TASK_MANAGEMENT 0xCC770023
! 181: #define CC_CSMI_SAS_GET_CONNECTOR_INFO 0xCC770024
! 182: #define CC_CSMI_SAS_GET_LOCATION 0xCC770025
! 183:
! 184:
! 185: // Control Codes requiring CSMI_PHY_SIGNATURE
! 186:
! 187: #define CC_CSMI_SAS_PHY_CONTROL 0xCC77003C
! 188:
! 189: // EDM #pragma CSMI_SAS_BEGIN_PACK(8)
! 190: #pragma pack(8)
! 191:
! 192: // IOCTL_HEADER
! 193: typedef struct _IOCTL_HEADER {
! 194: __u32 IOControllerNumber;
! 195: __u32 Length;
! 196: __u32 ReturnCode;
! 197: __u32 Timeout;
! 198: __u16 Direction;
! 199: } IOCTL_HEADER,
! 200: *PIOCTL_HEADER;
! 201:
! 202: // EDM #pragma CSMI_SAS_END_PACK
! 203: #pragma pack()
! 204:
! 205: #endif
! 206:
! 207: /*************************************************************************/
! 208: /* TARGET OS WINDOWS SPECIFIC CODE */
! 209: /*************************************************************************/
! 210:
! 211: #ifdef _WIN32
! 212:
! 213: // windows IOCTL definitions
! 214:
! 215: #if 0 // <ntddscsi.h> and CSMI_*_PACK are no longer needed
! 216:
! 217: #ifndef _NTDDSCSIH_
! 218: #include <ntddscsi.h>
! 219: #endif
! 220:
! 221: // pack definition
! 222:
! 223: #if defined _MSC_VER
! 224: #define CSMI_SAS_BEGIN_PACK(x) pack(push,x)
! 225: #define CSMI_SAS_END_PACK pack(pop)
! 226: #elif defined __BORLANDC__
! 227: #define CSMI_SAS_BEGIN_PACK(x) option -a##x
! 228: #define CSMI_SAS_END_PACK option -a.
! 229: #else
! 230: #error "CSMISAS.H - Must externally define a pack compiler designator."
! 231: #endif
! 232:
! 233: #endif // #if 0
! 234:
! 235: // base types
! 236:
! 237: #define __u8 unsigned char
! 238: #define __u16 unsigned short
! 239: #define __u32 unsigned long
! 240: #define __u64 unsigned __int64
! 241:
! 242: #define __i8 char
! 243:
! 244: // IOCTL Control Codes
! 245: // (IoctlHeader.ControlCode)
! 246:
! 247: // Control Codes requiring CSMI_ALL_SIGNATURE
! 248:
! 249: #define CC_CSMI_SAS_GET_DRIVER_INFO 1
! 250: #define CC_CSMI_SAS_GET_CNTLR_CONFIG 2
! 251: #define CC_CSMI_SAS_GET_CNTLR_STATUS 3
! 252: #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 4
! 253:
! 254: // Control Codes requiring CSMI_RAID_SIGNATURE
! 255:
! 256: #define CC_CSMI_SAS_GET_RAID_INFO 10
! 257: #define CC_CSMI_SAS_GET_RAID_CONFIG 11
! 258: #define CC_CSMI_SAS_GET_RAID_FEATURES 12
! 259: #define CC_CSMI_SAS_SET_RAID_CONTROL 13
! 260: #define CC_CSMI_SAS_GET_RAID_ELEMENT 14
! 261: #define CC_CSMI_SAS_SET_RAID_OPERATION 15
! 262:
! 263: // Control Codes requiring CSMI_SAS_SIGNATURE
! 264:
! 265: #define CC_CSMI_SAS_GET_PHY_INFO 20
! 266: #define CC_CSMI_SAS_SET_PHY_INFO 21
! 267: #define CC_CSMI_SAS_GET_LINK_ERRORS 22
! 268: #define CC_CSMI_SAS_SMP_PASSTHRU 23
! 269: #define CC_CSMI_SAS_SSP_PASSTHRU 24
! 270: #define CC_CSMI_SAS_STP_PASSTHRU 25
! 271: #define CC_CSMI_SAS_GET_SATA_SIGNATURE 26
! 272: #define CC_CSMI_SAS_GET_SCSI_ADDRESS 27
! 273: #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 28
! 274: #define CC_CSMI_SAS_TASK_MANAGEMENT 29
! 275: #define CC_CSMI_SAS_GET_CONNECTOR_INFO 30
! 276: #define CC_CSMI_SAS_GET_LOCATION 31
! 277:
! 278: // Control Codes requiring CSMI_PHY_SIGNATURE
! 279:
! 280: #define CC_CSMI_SAS_PHY_CONTROL 60
! 281:
! 282: #define IOCTL_HEADER SRB_IO_CONTROL
! 283: #define PIOCTL_HEADER PSRB_IO_CONTROL
! 284:
! 285: #endif
! 286:
! 287: /*************************************************************************/
! 288: /* TARGET OS NETWARE SPECIFIC CODE */
! 289: /*************************************************************************/
! 290:
! 291: #ifdef _NETWARE
! 292:
! 293: // NetWare IOCTL definitions
! 294:
! 295: #define CSMI_SAS_BEGIN_PACK(x) pack(x)
! 296: #define CSMI_SAS_END_PACK pack()
! 297:
! 298: #ifndef LONG
! 299: typedef unsigned long LONG;
! 300: #endif
! 301:
! 302: #ifndef WORD
! 303: typedef unsigned short WORD;
! 304: #endif
! 305:
! 306: #ifndef BYTE
! 307: typedef unsigned char BYTE;
! 308: #endif
! 309:
! 310: /* Need to have these definitions for Netware */
! 311: #define __u8 unsigned char
! 312: #define __u16 unsigned short
! 313: #define __u32 unsigned long
! 314: #define __u64 unsigned __int64
! 315:
! 316: #define __i8 char
! 317:
! 318:
! 319: // EDM #pragma CSMI_SAS_BEGIN_PACK(8)
! 320: #pragma pack(8)
! 321:
! 322: // IOCTL_HEADER
! 323: typedef struct _IOCTL_HEADER {
! 324: __u32 Length;
! 325: __u32 ReturnCode;
! 326: } IOCTL_HEADER,
! 327: *PIOCTL_HEADER;
! 328:
! 329: // EDM #pragma CSMI_SAS_END_PACK
! 330: #pragma pack()
! 331:
! 332: // IOCTL Control Codes
! 333: // (IoctlHeader.ControlCode)
! 334:
! 335: // Control Codes requiring CSMI_ALL_SIGNATURE
! 336:
! 337: #define CC_CSMI_SAS_GET_DRIVER_INFO 0x01FF0001
! 338: #define CC_CSMI_SAS_GET_CNTLR_CONFIG 0x01FF0002
! 339: #define CC_CSMI_SAS_GET_CNTLR_STATUS 0x01FF0003
! 340: #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD 0x01FF0004
! 341:
! 342: // Control Codes requiring CSMI_RAID_SIGNATURE
! 343:
! 344: #define CC_CSMI_SAS_GET_RAID_INFO 0x01FF000A
! 345: #define CC_CSMI_SAS_GET_RAID_CONFIG 0x01FF000B
! 346: #define CC_CSMI_SAS_GET_RAID_FEATURES 0x01FF000C
! 347: #define CC_CSMI_SAS_SET_RAID_CONTROL 0x01FF000D
! 348: #define CC_CSMI_SAS_GET_RAID_ELEMENT 0x01FF000E
! 349: #define CC_CSMI_SAS_SET_RAID_OPERATION 0x01FF000F
! 350:
! 351: // Control Codes requiring CSMI_SAS_SIGNATURE
! 352:
! 353: #define CC_CSMI_SAS_GET_PHY_INFO 0x01FF0014
! 354: #define CC_CSMI_SAS_SET_PHY_INFO 0x01FF0015
! 355: #define CC_CSMI_SAS_GET_LINK_ERRORS 0x01FF0016
! 356: #define CC_CSMI_SAS_SMP_PASSTHRU 0x01FF0017
! 357: #define CC_CSMI_SAS_SSP_PASSTHRU 0x01FF0018
! 358: #define CC_CSMI_SAS_STP_PASSTHRU 0x01FF0019
! 359: #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0x01FF001A
! 360: #define CC_CSMI_SAS_GET_SCSI_ADDRESS 0x01FF001B
! 361: #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0x01FF001C
! 362: #define CC_CSMI_SAS_TASK_MANAGEMENT 0x01FF001D
! 363: #define CC_CSMI_SAS_GET_CONNECTOR_INFO 0x01FF001E
! 364: #define CC_CSMI_SAS_GET_LOCATION 0x01FF001F
! 365:
! 366: // Control Codes requiring CSMI_PHY_SIGNATURE
! 367:
! 368: #define CC_CSMI_SAS_PHY_CONTROL 60
! 369:
! 370: #endif
! 371:
! 372: /*************************************************************************/
! 373: /* TARGET OS NOT DEFINED ERROR */
! 374: /*************************************************************************/
! 375:
! 376: // EDM
! 377: //#if (!_WIN32 && !_linux && !_NETWARE)
! 378: // #error "Unknown target OS."
! 379: //#endif
! 380:
! 381: /*************************************************************************/
! 382: /* OS INDEPENDENT CODE */
! 383: /*************************************************************************/
! 384:
! 385: /* * * * * * * * * * Class Independent IOCTL Constants * * * * * * * * * */
! 386:
! 387: // Return codes for all IOCTL's regardless of class
! 388: // (IoctlHeader.ReturnCode)
! 389:
! 390: #define CSMI_SAS_STATUS_SUCCESS 0
! 391: #define CSMI_SAS_STATUS_FAILED 1
! 392: #define CSMI_SAS_STATUS_BAD_CNTL_CODE 2
! 393: #define CSMI_SAS_STATUS_INVALID_PARAMETER 3
! 394: #define CSMI_SAS_STATUS_WRITE_ATTEMPTED 4
! 395:
! 396: // Signature value
! 397: // (IoctlHeader.Signature)
! 398:
! 399: #define CSMI_ALL_SIGNATURE "CSMIALL"
! 400:
! 401: // Timeout value default of 60 seconds
! 402: // (IoctlHeader.Timeout)
! 403:
! 404: #define CSMI_ALL_TIMEOUT 60
! 405:
! 406: // Direction values for data flow on this IOCTL
! 407: // (IoctlHeader.Direction, Linux only)
! 408: #define CSMI_SAS_DATA_READ 0
! 409: #define CSMI_SAS_DATA_WRITE 1
! 410:
! 411: // I/O Bus Types
! 412: // ISA and EISA bus types are not supported
! 413: // (bIoBusType)
! 414:
! 415: #define CSMI_SAS_BUS_TYPE_PCI 3
! 416: #define CSMI_SAS_BUS_TYPE_PCMCIA 4
! 417:
! 418: // Controller Status
! 419: // (uStatus)
! 420:
! 421: #define CSMI_SAS_CNTLR_STATUS_GOOD 1
! 422: #define CSMI_SAS_CNTLR_STATUS_FAILED 2
! 423: #define CSMI_SAS_CNTLR_STATUS_OFFLINE 3
! 424: #define CSMI_SAS_CNTLR_STATUS_POWEROFF 4
! 425:
! 426: // Offline Status Reason
! 427: // (uOfflineReason)
! 428:
! 429: #define CSMI_SAS_OFFLINE_REASON_NO_REASON 0
! 430: #define CSMI_SAS_OFFLINE_REASON_INITIALIZING 1
! 431: #define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_DEGRADED 2
! 432: #define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_FAILURE 3
! 433:
! 434: // Controller Class
! 435: // (bControllerClass)
! 436:
! 437: #define CSMI_SAS_CNTLR_CLASS_HBA 5
! 438:
! 439: // Controller Flag bits
! 440: // (uControllerFlags)
! 441:
! 442: #define CSMI_SAS_CNTLR_SAS_HBA 0x00000001
! 443: #define CSMI_SAS_CNTLR_SAS_RAID 0x00000002
! 444: #define CSMI_SAS_CNTLR_SATA_HBA 0x00000004
! 445: #define CSMI_SAS_CNTLR_SATA_RAID 0x00000008
! 446: #define CSMI_SAS_CNTLR_SMART_ARRAY 0x00000010
! 447:
! 448: // for firmware download
! 449: #define CSMI_SAS_CNTLR_FWD_SUPPORT 0x00010000
! 450: #define CSMI_SAS_CNTLR_FWD_ONLINE 0x00020000
! 451: #define CSMI_SAS_CNTLR_FWD_SRESET 0x00040000
! 452: #define CSMI_SAS_CNTLR_FWD_HRESET 0x00080000
! 453: #define CSMI_SAS_CNTLR_FWD_RROM 0x00100000
! 454:
! 455: // for RAID configuration supported
! 456: #define CSMI_SAS_CNTLR_RAID_CFG_SUPPORT 0x01000000
! 457:
! 458: // Download Flag bits
! 459: // (uDownloadFlags)
! 460: #define CSMI_SAS_FWD_VALIDATE 0x00000001
! 461: #define CSMI_SAS_FWD_SOFT_RESET 0x00000002
! 462: #define CSMI_SAS_FWD_HARD_RESET 0x00000004
! 463:
! 464: // Firmware Download Status
! 465: // (usStatus)
! 466: #define CSMI_SAS_FWD_SUCCESS 0
! 467: #define CSMI_SAS_FWD_FAILED 1
! 468: #define CSMI_SAS_FWD_USING_RROM 2
! 469: #define CSMI_SAS_FWD_REJECT 3
! 470: #define CSMI_SAS_FWD_DOWNREV 4
! 471:
! 472: // Firmware Download Severity
! 473: // (usSeverity>
! 474: #define CSMI_SAS_FWD_INFORMATION 0
! 475: #define CSMI_SAS_FWD_WARNING 1
! 476: #define CSMI_SAS_FWD_ERROR 2
! 477: #define CSMI_SAS_FWD_FATAL 3
! 478:
! 479: /* * * * * * * * * * SAS RAID Class IOCTL Constants * * * * * * * * */
! 480:
! 481: // Return codes for the RAID IOCTL's regardless of class
! 482: // (IoctlHeader.ReturnCode)
! 483:
! 484: #define CSMI_SAS_RAID_SET_OUT_OF_RANGE 1000
! 485: #define CSMI_SAS_RAID_SET_BUFFER_TOO_SMALL 1001
! 486: #define CSMI_SAS_RAID_SET_DATA_CHANGED 1002
! 487:
! 488: // Signature value
! 489: // (IoctlHeader.Signature)
! 490:
! 491: #define CSMI_RAID_SIGNATURE "CSMIARY"
! 492:
! 493: // Timeout value default of 60 seconds
! 494: // (IoctlHeader.Timeout)
! 495:
! 496: #define CSMI_RAID_TIMEOUT 60
! 497:
! 498: // RAID Types
! 499: // (bRaidType)
! 500: #define CSMI_SAS_RAID_TYPE_NONE 0
! 501: #define CSMI_SAS_RAID_TYPE_0 1
! 502: #define CSMI_SAS_RAID_TYPE_1 2
! 503: #define CSMI_SAS_RAID_TYPE_10 3
! 504: #define CSMI_SAS_RAID_TYPE_5 4
! 505: #define CSMI_SAS_RAID_TYPE_15 5
! 506: #define CSMI_SAS_RAID_TYPE_6 6
! 507: #define CSMI_SAS_RAID_TYPE_50 7
! 508: #define CSMI_SAS_RAID_TYPE_VOLUME 8
! 509: #define CSMI_SAS_RAID_TYPE_1E 9
! 510: #define CSMI_SAS_RAID_TYPE_OTHER 255
! 511: // the last value 255 was already defined for other
! 512: // so end is defined as 254
! 513: #define CSMI_SAS_RAID_TYPE_END 254
! 514:
! 515: // RAID Status
! 516: // (bStatus)
! 517: #define CSMI_SAS_RAID_SET_STATUS_OK 0
! 518: #define CSMI_SAS_RAID_SET_STATUS_DEGRADED 1
! 519: #define CSMI_SAS_RAID_SET_STATUS_REBUILDING 2
! 520: #define CSMI_SAS_RAID_SET_STATUS_FAILED 3
! 521: #define CSMI_SAS_RAID_SET_STATUS_OFFLINE 4
! 522: #define CSMI_SAS_RAID_SET_STATUS_TRANSFORMING 5
! 523: #define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_REBUILD 6
! 524: #define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_TRANSFORMATION 7
! 525:
! 526: // RAID Drive Count
! 527: // (bDriveCount, 0xF1 to 0xFF are reserved)
! 528: #define CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG 0xF1
! 529: #define CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED 0xF2
! 530:
! 531: // RAID Data Type
! 532: // (bDataType)
! 533: #define CSMI_SAS_RAID_DATA_DRIVES 0
! 534: #define CSMI_SAS_RAID_DATA_DEVICE_ID 1
! 535: #define CSMI_SAS_RAID_DATA_ADDITIONAL_DATA 2
! 536:
! 537: // RAID Drive Status
! 538: // (bDriveStatus)
! 539: #define CSMI_SAS_DRIVE_STATUS_OK 0
! 540: #define CSMI_SAS_DRIVE_STATUS_REBUILDING 1
! 541: #define CSMI_SAS_DRIVE_STATUS_FAILED 2
! 542: #define CSMI_SAS_DRIVE_STATUS_DEGRADED 3
! 543: #define CSMI_SAS_DRIVE_STATUS_OFFLINE 4
! 544: #define CSMI_SAS_DRIVE_STATUS_QUEUED_FOR_REBUILD 5
! 545:
! 546: // RAID Drive Usage
! 547: // (bDriveUsage)
! 548: #define CSMI_SAS_DRIVE_CONFIG_NOT_USED 0
! 549: #define CSMI_SAS_DRIVE_CONFIG_MEMBER 1
! 550: #define CSMI_SAS_DRIVE_CONFIG_SPARE 2
! 551: #define CSMI_SAS_DRIVE_CONFIG_SPARE_ACTIVE 3
! 552:
! 553: // RAID Drive Type
! 554: // (bDriveType)
! 555: #define CSMI_SAS_DRIVE_TYPE_UNKNOWN 0
! 556: #define CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS 1
! 557: #define CSMI_SAS_DRIVE_TYPE_DUAL_PORT_SAS 2
! 558: #define CSMI_SAS_DRIVE_TYPE_SATA 3
! 559: #define CSMI_SAS_DRIVE_TYPE_SATA_PS 4
! 560: #define CSMI_SAS_DRIVE_TYPE_OTHER 255
! 561:
! 562: // RAID Write Protect
! 563: // (bWriteProtect)
! 564: #define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN 0
! 565: #define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNCHANGED 0
! 566: #define CSMI_SAS_RAID_SET_WRITE_PROTECT_ENABLED 1
! 567: #define CSMI_SAS_RAID_SET_WRITE_PROTECT_DISABLED 2
! 568:
! 569: // RAID Cache Setting
! 570: // (bCacheSetting)
! 571: #define CSMI_SAS_RAID_SET_CACHE_UNKNOWN 0
! 572: #define CSMI_SAS_RAID_SET_CACHE_UNCHANGED 0
! 573: #define CSMI_SAS_RAID_SET_CACHE_ENABLED 1
! 574: #define CSMI_SAS_RAID_SET_CACHE_DISABLED 2
! 575: #define CSMI_SAS_RAID_SET_CACHE_CORRUPT 3
! 576:
! 577: // RAID Features
! 578: // (uFeatures)
! 579: #define CSMI_SAS_RAID_FEATURE_TRANSFORMATION 0x00000001
! 580: #define CSMI_SAS_RAID_FEATURE_REBUILD 0x00000002
! 581: #define CSMI_SAS_RAID_FEATURE_SPLIT_MIRROR 0x00000004
! 582: #define CSMI_SAS_RAID_FEATURE_MERGE_MIRROR 0x00000008
! 583: #define CSMI_SAS_RAID_FEATURE_LUN_RENUMBER 0x00000010
! 584: #define CSMI_SAS_RAID_FEATURE_SURFACE_SCAN 0x00000020
! 585: #define CSMI_SAS_RAID_FEATURE_SPARES_SHARED 0x00000040
! 586:
! 587: // RAID Priority
! 588: // (bDefaultTransformPriority, etc.)
! 589: #define CSMI_SAS_PRIORITY_UNKNOWN 0
! 590: #define CSMI_SAS_PRIORITY_UNCHANGED 0
! 591: #define CSMI_SAS_PRIORITY_AUTO 1
! 592: #define CSMI_SAS_PRIORITY_OFF 2
! 593: #define CSMI_SAS_PRIORITY_LOW 3
! 594: #define CSMI_SAS_PRIORITY_MEDIUM 4
! 595: #define CSMI_SAS_PRIORITY_HIGH 5
! 596:
! 597: // RAID Transformation Rules
! 598: // (uRaidSetTransformationRules)
! 599: #define CSMI_SAS_RAID_RULE_AVAILABLE_MEMORY 0x00000001
! 600: #define CSMI_SAS_RAID_RULE_OVERLAPPED_EXTENTS 0x00000002
! 601:
! 602: // RAID Cache Ratios Supported
! 603: // (bCacheRatiosSupported)
! 604: // from 0 to 100 defines the write to read ratio, 0 is 100% write
! 605: #define CSMI_SAS_RAID_CACHE_RATIO_RANGE 101
! 606: #define CSMI_SAS_RAID_CACHE_RATIO_FIXED 102
! 607: #define CSMI_SAS_RAID_CACHE_RATIO_AUTO 103
! 608: #define CSMI_SAS_RAID_CACHE_RATIO_END 255
! 609:
! 610: // RAID Cache Ratio Flag
! 611: // (bCacheRatioFlag)
! 612: #define CSMI_SAS_RAID_CACHE_RATIO_DISABLE 0
! 613: #define CSMI_SAS_RAID_CACHE_RATIO_ENABLE 1
! 614:
! 615: // RAID Clear Configuration Signature
! 616: // (bClearConfiguration)
! 617: #define CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE "RAIDCLR"
! 618:
! 619: // RAID Failure Codes
! 620: // (uFailureCode)
! 621: #define CSMI_SAS_FAIL_CODE_OK 0
! 622: #define CSMI_SAS_FAIL_CODE_PARAMETER_INVALID 1000
! 623: #define CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID 1001
! 624: #define CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID 1002
! 625: #define CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID 1003
! 626: #define CSMI_SAS_FAIL_CODE_SURFACE_SCAN_INVALID 1004
! 627: #define CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID 1005
! 628: #define CSMI_SAS_FAIL_CODE_ELEMENT_INDEX_INVALID 1006
! 629: #define CSMI_SAS_FAIL_CODE_SUBELEMENT_INDEX_INVALID 1007
! 630: #define CSMI_SAS_FAIL_CODE_EXTENT_INVALID 1008
! 631: #define CSMI_SAS_FAIL_CODE_BLOCK_COUNT_INVALID 1009
! 632: #define CSMI_SAS_FAIL_CODE_DRIVE_INDEX_INVALID 1010
! 633: #define CSMI_SAS_FAIL_CODE_EXISTING_LUN_INVALID 1011
! 634: #define CSMI_SAS_FAIL_CODE_RAID_TYPE_INVALID 1012
! 635: #define CSMI_SAS_FAIL_CODE_STRIPE_SIZE_INVALID 1013
! 636: #define CSMI_SAS_FAIL_CODE_TRANSFORMATION_INVALID 1014
! 637: #define CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID 1015
! 638: #define CSMI_SAS_FAIL_CODE_ENUMERATION_TYPE_INVALID 1016
! 639:
! 640: #define CSMI_SAS_FAIL_CODE_EXCEEDED_RAID_SET_COUNT 2000
! 641: #define CSMI_SAS_FAIL_CODE_DUPLICATE_LUN 2001
! 642:
! 643: #define CSMI_SAS_FAIL_CODE_WAIT_FOR_OPERATION 3000
! 644:
! 645: // RAID Enumeration Types
! 646: // (uEnumerationType)
! 647: #define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE 0
! 648: #define CSMI_SAS_RAID_ELEMENT_TYPE_MODULE 1
! 649: #define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE_RAID_SET 2
! 650: #define CSMI_SAS_RAID_ELEMENT_TYPE_EXTENT_DRIVE 3
! 651:
! 652: // RAID Extent Types
! 653: // (bExtentType)
! 654: #define CSMI_SAS_RAID_EXTENT_RESERVED 0
! 655: #define CSMI_SAS_RAID_EXTENT_METADATA 1
! 656: #define CSMI_SAS_RAID_EXTENT_ALLOCATED 2
! 657: #define CSMI_SAS_RAID_EXTENT_UNALLOCATED 3
! 658:
! 659: // RAID Operation Types
! 660: // (uOperationType)
! 661: #define CSMI_SAS_RAID_SET_CREATE 0
! 662: #define CSMI_SAS_RAID_SET_LABEL 1
! 663: #define CSMI_SAS_RAID_SET_TRANSFORM 2
! 664: #define CSMI_SAS_RAID_SET_DELETE 3
! 665: #define CSMI_SAS_RAID_SET_WRITE_PROTECT 4
! 666: #define CSMI_SAS_RAID_SET_CACHE 5
! 667: #define CSMI_SAS_RAID_SET_ONLINE_STATE 6
! 668: #define CSMI_SAS_RAID_SET_SPARE 7
! 669:
! 670: // RAID Transform Types
! 671: // (bTransformType)
! 672: #define CSMI_SAS_RAID_SET_TRANSFORM_SPLIT_MIRROR 0
! 673: #define CSMI_SAS_RAID_SET_TRANSFORM_MERGE_RAID_0 1
! 674: #define CSMI_SAS_RAID_SET_TRANSFORM_LUN_RENUMBER 2
! 675: #define CSMI_SAS_RAID_SET_TRANSFORM_RAID_SET 3
! 676:
! 677: // RAID Online State
! 678: // (bOnlineState)
! 679: #define CSMI_SAS_RAID_SET_STATE_UNKNOWN 0
! 680: #define CSMI_SAS_RAID_SET_STATE_ONLINE 1
! 681: #define CSMI_SAS_RAID_SET_STATE_OFFLINE 2
! 682:
! 683: /* * * * * * * * * * SAS HBA Class IOCTL Constants * * * * * * * * * */
! 684:
! 685: // Return codes for SAS IOCTL's
! 686: // (IoctlHeader.ReturnCode)
! 687:
! 688: #define CSMI_SAS_PHY_INFO_CHANGED CSMI_SAS_STATUS_SUCCESS
! 689: #define CSMI_SAS_PHY_INFO_NOT_CHANGEABLE 2000
! 690: #define CSMI_SAS_LINK_RATE_OUT_OF_RANGE 2001
! 691:
! 692: #define CSMI_SAS_PHY_DOES_NOT_EXIST 2002
! 693: #define CSMI_SAS_PHY_DOES_NOT_MATCH_PORT 2003
! 694: #define CSMI_SAS_PHY_CANNOT_BE_SELECTED 2004
! 695: #define CSMI_SAS_SELECT_PHY_OR_PORT 2005
! 696: #define CSMI_SAS_PORT_DOES_NOT_EXIST 2006
! 697: #define CSMI_SAS_PORT_CANNOT_BE_SELECTED 2007
! 698: #define CSMI_SAS_CONNECTION_FAILED 2008
! 699:
! 700: #define CSMI_SAS_NO_SATA_DEVICE 2009
! 701: #define CSMI_SAS_NO_SATA_SIGNATURE 2010
! 702: #define CSMI_SAS_SCSI_EMULATION 2011
! 703: #define CSMI_SAS_NOT_AN_END_DEVICE 2012
! 704: #define CSMI_SAS_NO_SCSI_ADDRESS 2013
! 705: #define CSMI_SAS_NO_DEVICE_ADDRESS 2014
! 706:
! 707: // Signature value
! 708: // (IoctlHeader.Signature)
! 709:
! 710: #define CSMI_SAS_SIGNATURE "CSMISAS"
! 711:
! 712: // Timeout value default of 60 seconds
! 713: // (IoctlHeader.Timeout)
! 714:
! 715: #define CSMI_SAS_TIMEOUT 60
! 716:
! 717: // Device types
! 718: // (bDeviceType)
! 719:
! 720: #define CSMI_SAS_PHY_UNUSED 0x00
! 721: #define CSMI_SAS_NO_DEVICE_ATTACHED 0x00
! 722: #define CSMI_SAS_END_DEVICE 0x10
! 723: #define CSMI_SAS_EDGE_EXPANDER_DEVICE 0x20
! 724: #define CSMI_SAS_FANOUT_EXPANDER_DEVICE 0x30
! 725:
! 726: // Protocol options
! 727: // (bInitiatorPortProtocol, bTargetPortProtocol)
! 728:
! 729: #define CSMI_SAS_PROTOCOL_SATA 0x01
! 730: #define CSMI_SAS_PROTOCOL_SMP 0x02
! 731: #define CSMI_SAS_PROTOCOL_STP 0x04
! 732: #define CSMI_SAS_PROTOCOL_SSP 0x08
! 733:
! 734: // Negotiated and hardware link rates
! 735: // (bNegotiatedLinkRate, bMinimumLinkRate, bMaximumLinkRate)
! 736:
! 737: #define CSMI_SAS_LINK_RATE_UNKNOWN 0x00
! 738: #define CSMI_SAS_PHY_DISABLED 0x01
! 739: #define CSMI_SAS_LINK_RATE_FAILED 0x02
! 740: #define CSMI_SAS_SATA_SPINUP_HOLD 0x03
! 741: #define CSMI_SAS_SATA_PORT_SELECTOR 0x04
! 742: #define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08
! 743: #define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09
! 744: #define CSMI_SAS_LINK_VIRTUAL 0x10
! 745:
! 746: // Discover state
! 747: // (bAutoDiscover)
! 748:
! 749: #define CSMI_SAS_DISCOVER_NOT_SUPPORTED 0x00
! 750: #define CSMI_SAS_DISCOVER_NOT_STARTED 0x01
! 751: #define CSMI_SAS_DISCOVER_IN_PROGRESS 0x02
! 752: #define CSMI_SAS_DISCOVER_COMPLETE 0x03
! 753: #define CSMI_SAS_DISCOVER_ERROR 0x04
! 754:
! 755: // Phy features
! 756:
! 757: #define CSMI_SAS_PHY_VIRTUAL_SMP 0x01
! 758:
! 759: // Programmed link rates
! 760: // (bMinimumLinkRate, bMaximumLinkRate)
! 761: // (bProgrammedMinimumLinkRate, bProgrammedMaximumLinkRate)
! 762:
! 763: #define CSMI_SAS_PROGRAMMED_LINK_RATE_UNCHANGED 0x00
! 764: #define CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS 0x08
! 765: #define CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS 0x09
! 766:
! 767: // Link rate
! 768: // (bNegotiatedLinkRate in CSMI_SAS_SET_PHY_INFO)
! 769:
! 770: #define CSMI_SAS_LINK_RATE_NEGOTIATE 0x00
! 771: #define CSMI_SAS_LINK_RATE_PHY_DISABLED 0x01
! 772:
! 773: // Signal class
! 774: // (bSignalClass in CSMI_SAS_SET_PHY_INFO)
! 775:
! 776: #define CSMI_SAS_SIGNAL_CLASS_UNKNOWN 0x00
! 777: #define CSMI_SAS_SIGNAL_CLASS_DIRECT 0x01
! 778: #define CSMI_SAS_SIGNAL_CLASS_SERVER 0x02
! 779: #define CSMI_SAS_SIGNAL_CLASS_ENCLOSURE 0x03
! 780:
! 781: // Link error reset
! 782: // (bResetCounts)
! 783:
! 784: #define CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS 0x00
! 785: #define CSMI_SAS_LINK_ERROR_RESET_COUNTS 0x01
! 786:
! 787: // Phy identifier
! 788: // (bPhyIdentifier)
! 789:
! 790: #define CSMI_SAS_USE_PORT_IDENTIFIER 0xFF
! 791:
! 792: // Port identifier
! 793: // (bPortIdentifier)
! 794:
! 795: #define CSMI_SAS_IGNORE_PORT 0xFF
! 796:
! 797: // Programmed link rates
! 798: // (bConnectionRate)
! 799:
! 800: #define CSMI_SAS_LINK_RATE_NEGOTIATED 0x00
! 801: #define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08
! 802: #define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09
! 803:
! 804: // Connection status
! 805: // (bConnectionStatus)
! 806:
! 807: #define CSMI_SAS_OPEN_ACCEPT 0
! 808: #define CSMI_SAS_OPEN_REJECT_BAD_DESTINATION 1
! 809: #define CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED 2
! 810: #define CSMI_SAS_OPEN_REJECT_NO_DESTINATION 3
! 811: #define CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED 4
! 812: #define CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED 5
! 813: #define CSMI_SAS_OPEN_REJECT_RESERVE_ABANDON 6
! 814: #define CSMI_SAS_OPEN_REJECT_RESERVE_CONTINUE 7
! 815: #define CSMI_SAS_OPEN_REJECT_RESERVE_INITIALIZE 8
! 816: #define CSMI_SAS_OPEN_REJECT_RESERVE_STOP 9
! 817: #define CSMI_SAS_OPEN_REJECT_RETRY 10
! 818: #define CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY 11
! 819: #define CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION 12
! 820:
! 821: // SSP Status
! 822: // (bSSPStatus)
! 823:
! 824: #define CSMI_SAS_SSP_STATUS_UNKNOWN 0x00
! 825: #define CSMI_SAS_SSP_STATUS_WAITING 0x01
! 826: #define CSMI_SAS_SSP_STATUS_COMPLETED 0x02
! 827: #define CSMI_SAS_SSP_STATUS_FATAL_ERROR 0x03
! 828: #define CSMI_SAS_SSP_STATUS_RETRY 0x04
! 829: #define CSMI_SAS_SSP_STATUS_NO_TAG 0x05
! 830:
! 831: // SSP Flags
! 832: // (uFlags)
! 833:
! 834: #define CSMI_SAS_SSP_READ 0x00000001
! 835: #define CSMI_SAS_SSP_WRITE 0x00000002
! 836: #define CSMI_SAS_SSP_UNSPECIFIED 0x00000004
! 837:
! 838: #define CSMI_SAS_SSP_TASK_ATTRIBUTE_SIMPLE 0x00000000
! 839: #define CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE 0x00000010
! 840: #define CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED 0x00000020
! 841: #define CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA 0x00000040
! 842:
! 843: // SSP Data present
! 844: // (bDataPresent)
! 845:
! 846: #define CSMI_SAS_SSP_NO_DATA_PRESENT 0x00
! 847: #define CSMI_SAS_SSP_RESPONSE_DATA_PRESENT 0x01
! 848: #define CSMI_SAS_SSP_SENSE_DATA_PRESENT 0x02
! 849:
! 850: // STP Flags
! 851: // (uFlags)
! 852:
! 853: #define CSMI_SAS_STP_READ 0x00000001
! 854: #define CSMI_SAS_STP_WRITE 0x00000002
! 855: #define CSMI_SAS_STP_UNSPECIFIED 0x00000004
! 856: #define CSMI_SAS_STP_PIO 0x00000010
! 857: #define CSMI_SAS_STP_DMA 0x00000020
! 858: #define CSMI_SAS_STP_PACKET 0x00000040
! 859: #define CSMI_SAS_STP_DMA_QUEUED 0x00000080
! 860: #define CSMI_SAS_STP_EXECUTE_DIAG 0x00000100
! 861: #define CSMI_SAS_STP_RESET_DEVICE 0x00000200
! 862:
! 863: // Task Management Flags
! 864: // (uFlags)
! 865:
! 866: #define CSMI_SAS_TASK_IU 0x00000001
! 867: #define CSMI_SAS_HARD_RESET_SEQUENCE 0x00000002
! 868: #define CSMI_SAS_SUPPRESS_RESULT 0x00000004
! 869:
! 870: // Task Management Functions
! 871: // (bTaskManagement)
! 872:
! 873: #define CSMI_SAS_SSP_ABORT_TASK 0x01
! 874: #define CSMI_SAS_SSP_ABORT_TASK_SET 0x02
! 875: #define CSMI_SAS_SSP_CLEAR_TASK_SET 0x04
! 876: #define CSMI_SAS_SSP_LOGICAL_UNIT_RESET 0x08
! 877: #define CSMI_SAS_SSP_CLEAR_ACA 0x40
! 878: #define CSMI_SAS_SSP_QUERY_TASK 0x80
! 879:
! 880: // Task Management Information
! 881: // (uInformation)
! 882:
! 883: #define CSMI_SAS_SSP_TEST 1
! 884: #define CSMI_SAS_SSP_EXCEEDED 2
! 885: #define CSMI_SAS_SSP_DEMAND 3
! 886: #define CSMI_SAS_SSP_TRIGGER 4
! 887:
! 888: // Connector Pinout Information
! 889: // (uPinout)
! 890:
! 891: #define CSMI_SAS_CON_UNKNOWN 0x00000001
! 892: #define CSMI_SAS_CON_SFF_8482 0x00000002
! 893: #define CSMI_SAS_CON_SFF_8470_LANE_1 0x00000100
! 894: #define CSMI_SAS_CON_SFF_8470_LANE_2 0x00000200
! 895: #define CSMI_SAS_CON_SFF_8470_LANE_3 0x00000400
! 896: #define CSMI_SAS_CON_SFF_8470_LANE_4 0x00000800
! 897: #define CSMI_SAS_CON_SFF_8484_LANE_1 0x00010000
! 898: #define CSMI_SAS_CON_SFF_8484_LANE_2 0x00020000
! 899: #define CSMI_SAS_CON_SFF_8484_LANE_3 0x00040000
! 900: #define CSMI_SAS_CON_SFF_8484_LANE_4 0x00080000
! 901:
! 902: // Connector Location Information
! 903: // (bLocation)
! 904:
! 905: // same as uPinout above...
! 906: // #define CSMI_SAS_CON_UNKNOWN 0x01
! 907: #define CSMI_SAS_CON_INTERNAL 0x02
! 908: #define CSMI_SAS_CON_EXTERNAL 0x04
! 909: #define CSMI_SAS_CON_SWITCHABLE 0x08
! 910: #define CSMI_SAS_CON_AUTO 0x10
! 911: #define CSMI_SAS_CON_NOT_PRESENT 0x20
! 912: #define CSMI_SAS_CON_NOT_CONNECTED 0x80
! 913:
! 914: // Device location identification
! 915: // (bIdentify)
! 916:
! 917: #define CSMI_SAS_LOCATE_UNKNOWN 0x00
! 918: #define CSMI_SAS_LOCATE_FORCE_OFF 0x01
! 919: #define CSMI_SAS_LOCATE_FORCE_ON 0x02
! 920:
! 921: // Location Valid flags
! 922: // (uLocationFlags)
! 923:
! 924: #define CSMI_SAS_LOCATE_SAS_ADDRESS_VALID 0x00000001
! 925: #define CSMI_SAS_LOCATE_SAS_LUN_VALID 0x00000002
! 926: #define CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID 0x00000004
! 927: #define CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID 0x00000008
! 928: #define CSMI_SAS_LOCATE_BAY_PREFIX_VALID 0x00000010
! 929: #define CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID 0x00000020
! 930: #define CSMI_SAS_LOCATE_LOCATION_STATE_VALID 0x00000040
! 931:
! 932: /* * * * * * * * SAS Phy Control Class IOCTL Constants * * * * * * * * */
! 933:
! 934: // Return codes for SAS Phy Control IOCTL's
! 935: // (IoctlHeader.ReturnCode)
! 936:
! 937: // Signature value
! 938: // (IoctlHeader.Signature)
! 939:
! 940: #define CSMI_PHY_SIGNATURE "CSMIPHY"
! 941:
! 942: // Phy Control Functions
! 943: // (bFunction)
! 944:
! 945: // values 0x00 to 0xFF are consistent in definition with the SMP PHY CONTROL
! 946: // function defined in the SAS spec
! 947: #define CSMI_SAS_PC_NOP 0x00000000
! 948: #define CSMI_SAS_PC_LINK_RESET 0x00000001
! 949: #define CSMI_SAS_PC_HARD_RESET 0x00000002
! 950: #define CSMI_SAS_PC_PHY_DISABLE 0x00000003
! 951: // 0x04 to 0xFF reserved...
! 952: #define CSMI_SAS_PC_GET_PHY_SETTINGS 0x00000100
! 953:
! 954: // Link Flags
! 955: #define CSMI_SAS_PHY_ACTIVATE_CONTROL 0x00000001
! 956: #define CSMI_SAS_PHY_UPDATE_SPINUP_RATE 0x00000002
! 957: #define CSMI_SAS_PHY_AUTO_COMWAKE 0x00000004
! 958:
! 959: // Device Types for Phy Settings
! 960: // (bType)
! 961: #define CSMI_SAS_UNDEFINED 0x00
! 962: #define CSMI_SAS_SATA 0x01
! 963: #define CSMI_SAS_SAS 0x02
! 964:
! 965: // Transmitter Flags
! 966: // (uTransmitterFlags)
! 967: #define CSMI_SAS_PHY_PREEMPHASIS_DISABLED 0x00000001
! 968:
! 969: // Receiver Flags
! 970: // (uReceiverFlags)
! 971: #define CSMI_SAS_PHY_EQUALIZATION_DISABLED 0x00000001
! 972:
! 973: // Pattern Flags
! 974: // (uPatternFlags)
! 975: // #define CSMI_SAS_PHY_ACTIVATE_CONTROL 0x00000001
! 976: #define CSMI_SAS_PHY_DISABLE_SCRAMBLING 0x00000002
! 977: #define CSMI_SAS_PHY_DISABLE_ALIGN 0x00000004
! 978: #define CSMI_SAS_PHY_DISABLE_SSC 0x00000008
! 979:
! 980: #define CSMI_SAS_PHY_FIXED_PATTERN 0x00000010
! 981: #define CSMI_SAS_PHY_USER_PATTERN 0x00000020
! 982:
! 983: // Fixed Patterns
! 984: // (bFixedPattern)
! 985: #define CSMI_SAS_PHY_CJPAT 0x00000001
! 986: #define CSMI_SAS_PHY_ALIGN 0x00000002
! 987:
! 988: // Type Flags
! 989: // (bTypeFlags)
! 990: #define CSMI_SAS_PHY_POSITIVE_DISPARITY 0x01
! 991: #define CSMI_SAS_PHY_NEGATIVE_DISPARITY 0x02
! 992: #define CSMI_SAS_PHY_CONTROL_CHARACTER 0x04
! 993:
! 994: // Miscellaneous
! 995: #define SLOT_NUMBER_UNKNOWN 0xFFFF
! 996:
! 997: /*************************************************************************/
! 998: /* DATA STRUCTURES */
! 999: /*************************************************************************/
! 1000:
! 1001: /* * * * * * * * * * Class Independent Structures * * * * * * * * * */
! 1002:
! 1003: // EDM #pragma CSMI_SAS_BEGIN_PACK(8)
! 1004: #pragma pack(8)
! 1005:
! 1006: // CC_CSMI_SAS_DRIVER_INFO
! 1007:
! 1008: typedef struct _CSMI_SAS_DRIVER_INFO {
! 1009: __u8 szName[81];
! 1010: __u8 szDescription[81];
! 1011: __u16 usMajorRevision;
! 1012: __u16 usMinorRevision;
! 1013: __u16 usBuildRevision;
! 1014: __u16 usReleaseRevision;
! 1015: __u16 usCSMIMajorRevision;
! 1016: __u16 usCSMIMinorRevision;
! 1017: } CSMI_SAS_DRIVER_INFO,
! 1018: *PCSMI_SAS_DRIVER_INFO;
! 1019:
! 1020: typedef struct _CSMI_SAS_DRIVER_INFO_BUFFER {
! 1021: IOCTL_HEADER IoctlHeader;
! 1022: CSMI_SAS_DRIVER_INFO Information;
! 1023: } CSMI_SAS_DRIVER_INFO_BUFFER,
! 1024: *PCSMI_SAS_DRIVER_INFO_BUFFER;
! 1025:
! 1026: // CC_CSMI_SAS_CNTLR_CONFIGURATION
! 1027:
! 1028: typedef struct _CSMI_SAS_PCI_BUS_ADDRESS {
! 1029: __u8 bBusNumber;
! 1030: __u8 bDeviceNumber;
! 1031: __u8 bFunctionNumber;
! 1032: __u8 bReserved;
! 1033: } CSMI_SAS_PCI_BUS_ADDRESS,
! 1034: *PCSMI_SAS_PCI_BUS_ADDRESS;
! 1035:
! 1036: typedef union _CSMI_SAS_IO_BUS_ADDRESS {
! 1037: CSMI_SAS_PCI_BUS_ADDRESS PciAddress;
! 1038: __u8 bReserved[32];
! 1039: } CSMI_SAS_IO_BUS_ADDRESS,
! 1040: *PCSMI_SAS_IO_BUS_ADDRESS;
! 1041:
! 1042: typedef struct _CSMI_SAS_CNTLR_CONFIG {
! 1043: __u32 uBaseIoAddress;
! 1044: struct {
! 1045: __u32 uLowPart;
! 1046: __u32 uHighPart;
! 1047: } BaseMemoryAddress;
! 1048: __u32 uBoardID;
! 1049: __u16 usSlotNumber;
! 1050: __u8 bControllerClass;
! 1051: __u8 bIoBusType;
! 1052: CSMI_SAS_IO_BUS_ADDRESS BusAddress;
! 1053: __u8 szSerialNumber[81];
! 1054: __u16 usMajorRevision;
! 1055: __u16 usMinorRevision;
! 1056: __u16 usBuildRevision;
! 1057: __u16 usReleaseRevision;
! 1058: __u16 usBIOSMajorRevision;
! 1059: __u16 usBIOSMinorRevision;
! 1060: __u16 usBIOSBuildRevision;
! 1061: __u16 usBIOSReleaseRevision;
! 1062: __u32 uControllerFlags;
! 1063: __u16 usRromMajorRevision;
! 1064: __u16 usRromMinorRevision;
! 1065: __u16 usRromBuildRevision;
! 1066: __u16 usRromReleaseRevision;
! 1067: __u16 usRromBIOSMajorRevision;
! 1068: __u16 usRromBIOSMinorRevision;
! 1069: __u16 usRromBIOSBuildRevision;
! 1070: __u16 usRromBIOSReleaseRevision;
! 1071: __u8 bReserved[7];
! 1072: } CSMI_SAS_CNTLR_CONFIG,
! 1073: *PCSMI_SAS_CNTLR_CONFIG;
! 1074:
! 1075: typedef struct _CSMI_SAS_CNTLR_CONFIG_BUFFER {
! 1076: IOCTL_HEADER IoctlHeader;
! 1077: CSMI_SAS_CNTLR_CONFIG Configuration;
! 1078: } CSMI_SAS_CNTLR_CONFIG_BUFFER,
! 1079: *PCSMI_SAS_CNTLR_CONFIG_BUFFER;
! 1080:
! 1081: // CC_CSMI_SAS_CNTLR_STATUS
! 1082:
! 1083: typedef struct _CSMI_SAS_CNTLR_STATUS {
! 1084: __u32 uStatus;
! 1085: __u32 uOfflineReason;
! 1086: __u8 bReserved[28];
! 1087: } CSMI_SAS_CNTLR_STATUS,
! 1088: *PCSMI_SAS_CNTLR_STATUS;
! 1089:
! 1090: typedef struct _CSMI_SAS_CNTLR_STATUS_BUFFER {
! 1091: IOCTL_HEADER IoctlHeader;
! 1092: CSMI_SAS_CNTLR_STATUS Status;
! 1093: } CSMI_SAS_CNTLR_STATUS_BUFFER,
! 1094: *PCSMI_SAS_CNTLR_STATUS_BUFFER;
! 1095:
! 1096: // CC_CSMI_SAS_FIRMWARE_DOWNLOAD
! 1097:
! 1098: typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD {
! 1099: __u32 uBufferLength;
! 1100: __u32 uDownloadFlags;
! 1101: __u8 bReserved[32];
! 1102: __u16 usStatus;
! 1103: __u16 usSeverity;
! 1104: } CSMI_SAS_FIRMWARE_DOWNLOAD,
! 1105: *PCSMI_SAS_FIRMWARE_DOWNLOAD;
! 1106:
! 1107: typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER {
! 1108: IOCTL_HEADER IoctlHeader;
! 1109: CSMI_SAS_FIRMWARE_DOWNLOAD Information;
! 1110: __u8 bDataBuffer[1];
! 1111: } CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER,
! 1112: *PCSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER;
! 1113:
! 1114: // CC_CSMI_SAS_RAID_INFO
! 1115:
! 1116: typedef struct _CSMI_SAS_RAID_INFO {
! 1117: __u32 uNumRaidSets;
! 1118: __u32 uMaxDrivesPerSet;
! 1119: __u32 uMaxRaidSets;
! 1120: __u8 bMaxRaidTypes;
! 1121: __u8 bReservedByteFields[7];
! 1122: struct
! 1123: {
! 1124: __u32 uLowPart;
! 1125: __u32 uHighPart;
! 1126: } ulMinRaidSetBlocks;
! 1127: struct
! 1128: {
! 1129: __u32 uLowPart;
! 1130: __u32 uHighPart;
! 1131: } ulMaxRaidSetBlocks;
! 1132: __u32 uMaxPhysicalDrives;
! 1133: __u32 uMaxExtents;
! 1134: __u32 uMaxModules;
! 1135: __u32 uMaxTransformationMemory;
! 1136: __u32 uChangeCount;
! 1137: __u8 bReserved[44];
! 1138: } CSMI_SAS_RAID_INFO,
! 1139: *PCSMI_SAS_RAID_INFO;
! 1140:
! 1141: typedef struct _CSMI_SAS_RAID_INFO_BUFFER {
! 1142: IOCTL_HEADER IoctlHeader;
! 1143: CSMI_SAS_RAID_INFO Information;
! 1144: } CSMI_SAS_RAID_INFO_BUFFER,
! 1145: *PCSMI_SAS_RAID_INFO_BUFFER;
! 1146:
! 1147: // CC_CSMI_SAS_GET_RAID_CONFIG
! 1148:
! 1149: typedef struct _CSMI_SAS_RAID_DRIVES {
! 1150: __u8 bModel[40];
! 1151: __u8 bFirmware[8];
! 1152: __u8 bSerialNumber[40];
! 1153: __u8 bSASAddress[8];
! 1154: __u8 bSASLun[8];
! 1155: __u8 bDriveStatus;
! 1156: __u8 bDriveUsage;
! 1157: __u16 usBlockSize;
! 1158: __u8 bDriveType;
! 1159: __u8 bReserved[15];
! 1160: __u32 uDriveIndex;
! 1161: struct
! 1162: {
! 1163: __u32 uLowPart;
! 1164: __u32 uHighPart;
! 1165: } ulTotalUserBlocks;
! 1166: } CSMI_SAS_RAID_DRIVES,
! 1167: *PCSMI_SAS_RAID_DRIVES;
! 1168:
! 1169: typedef struct _CSMI_SAS_RAID_DEVICE_ID {
! 1170: __u8 bDeviceIdentificationVPDPage[1];
! 1171: } CSMI_SAS_RAID_DEVICE_ID,
! 1172: *PCSMI_SAS_RAID_DEVICE_ID;
! 1173:
! 1174: typedef struct _CSMI_SAS_RAID_SET_ADDITIONAL_DATA {
! 1175: __u8 bLabel[16];
! 1176: __u8 bRaidSetLun[8];
! 1177: __u8 bWriteProtection;
! 1178: __u8 bCacheSetting;
! 1179: __u8 bCacheRatio;
! 1180: __u16 usBlockSize;
! 1181: __u8 bReservedBytes[11];
! 1182: struct
! 1183: {
! 1184: __u32 uLowPart;
! 1185: __u32 uHighPart;
! 1186: } ulRaidSetExtentOffset;
! 1187: struct
! 1188: {
! 1189: __u32 uLowPart;
! 1190: __u32 uHighPart;
! 1191: } ulRaidSetBlocks;
! 1192: __u32 uStripeSizeInBlocks;
! 1193: __u32 uSectorsPerTrack;
! 1194: __u8 bApplicationScratchPad[16];
! 1195: __u32 uNumberOfHeads;
! 1196: __u32 uNumberOfTracks;
! 1197: __u8 bReserved[24];
! 1198: } CSMI_SAS_RAID_SET_ADDITIONAL_DATA,
! 1199: *PCSMI_SAS_RAID_SET_ADDITIONAL_DATA;
! 1200:
! 1201: typedef struct _CSMI_SAS_RAID_CONFIG {
! 1202: __u32 uRaidSetIndex;
! 1203: __u32 uCapacity;
! 1204: __u32 uStripeSize;
! 1205: __u8 bRaidType;
! 1206: __u8 bStatus;
! 1207: __u8 bInformation;
! 1208: __u8 bDriveCount;
! 1209: __u8 bDataType;
! 1210: __u8 bReserved[11];
! 1211: __u32 uFailureCode;
! 1212: __u32 uChangeCount;
! 1213: union {
! 1214: CSMI_SAS_RAID_DRIVES Drives[1];
! 1215: CSMI_SAS_RAID_DEVICE_ID DeviceId[1];
! 1216: CSMI_SAS_RAID_SET_ADDITIONAL_DATA Data[1];
! 1217: };
! 1218: } CSMI_SAS_RAID_CONFIG,
! 1219: *PCSMI_SAS_RAID_CONFIG;
! 1220:
! 1221: typedef struct _CSMI_SAS_RAID_CONFIG_BUFFER {
! 1222: IOCTL_HEADER IoctlHeader;
! 1223: CSMI_SAS_RAID_CONFIG Configuration;
! 1224: } CSMI_SAS_RAID_CONFIG_BUFFER,
! 1225: *PCSMI_SAS_RAID_CONFIG_BUFFER;
! 1226:
! 1227: // CC_CSMI_SAS_GET_RAID_FEATURES
! 1228:
! 1229: typedef struct _CSMI_SAS_RAID_TYPE_DESCRIPTION {
! 1230: __u8 bRaidType;
! 1231: __u8 bReservedBytes[7];
! 1232: __u32 uSupportedStripeSizeMap;
! 1233: __u8 bReserved[24];
! 1234: } CSMI_SAS_RAID_TYPE_DESCRIPTION,
! 1235: *PCSMI_SAS_RAID_TYPE_DESCRIPTION;
! 1236:
! 1237: typedef struct _CSMI_SAS_RAID_FEATURES {
! 1238: __u32 uFeatures;
! 1239: __u8 bReservedFeatures[32];
! 1240: __u8 bDefaultTransformPriority;
! 1241: __u8 bTransformPriority;
! 1242: __u8 bDefaultRebuildPriority;
! 1243: __u8 bRebuildPriority;
! 1244: __u8 bDefaultSurfaceScanPriority;
! 1245: __u8 bSurfaceScanPriority;
! 1246: __u16 usReserved;
! 1247: __u32 uRaidSetTransformationRules;
! 1248: __u32 uReserved[11];
! 1249: CSMI_SAS_RAID_TYPE_DESCRIPTION RaidType[24];
! 1250: __u8 bCacheRatiosSupported[104];
! 1251: __u32 uChangeCount;
! 1252: __u32 uFailureCode;
! 1253: __u8 bReserved[120];
! 1254: } CSMI_SAS_RAID_FEATURES,
! 1255: *PCSMI_SAS_RAID_FEATURES;
! 1256:
! 1257: typedef struct _CSMI_SAS_RAID_FEATURES_BUFFER {
! 1258: IOCTL_HEADER IoctlHeader;
! 1259: CSMI_SAS_RAID_FEATURES Information;
! 1260: } CSMI_SAS_RAID_FEATURES_BUFFER,
! 1261: *PCSMI_SAS_RAID_FEATURES_BUFFER;
! 1262:
! 1263: // CC_CSMI_SAS_SET_RAID_CONTROL
! 1264:
! 1265: typedef struct _CSMI_SAS_RAID_CONTROL {
! 1266: __u8 bTransformPriority;
! 1267: __u8 bRebuildPriority;
! 1268: __u8 bCacheRatioFlag;
! 1269: __u8 bCacheRatio;
! 1270: __u8 bSurfaceScanPriority;
! 1271: __u8 bReservedBytes[15];
! 1272: __u8 bClearConfiguration[8];
! 1273: __u32 uChangeCount;
! 1274: __u8 bReserved[88];
! 1275: __u32 uFailureCode;
! 1276: __u8 bFailureDescription[80];
! 1277: } CSMI_SAS_RAID_CONTROL,
! 1278: *PCSMI_SAS_RAID_CONTROL;
! 1279:
! 1280: typedef struct _CSMI_SAS_RAID_CONTROL_BUFFER {
! 1281: IOCTL_HEADER IoctlHeader;
! 1282: CSMI_SAS_RAID_CONTROL Information;
! 1283: } CSMI_SAS_RAID_CONTROL_BUFFER,
! 1284: *PCSMI_SAS_RAID_CONTROL_BUFFER;
! 1285:
! 1286: // CC_CSMI_SAS_GET_RAID_ELEMENT
! 1287:
! 1288: typedef struct _CSMI_SAS_DRIVE_EXTENT_INFO {
! 1289: __u32 uDriveIndex;
! 1290: __u8 bExtentType;
! 1291: __u8 bReservedBytes[7];
! 1292: struct
! 1293: {
! 1294: __u32 uLowPart;
! 1295: __u32 uHighPart;
! 1296: } ulExtentOffset;
! 1297: struct
! 1298: {
! 1299: __u32 uLowPart;
! 1300: __u32 uHighPart;
! 1301: } ulExtentBlocks;
! 1302: __u32 uRaidSetIndex;
! 1303: __u8 bReserved[96];
! 1304: } CSMI_SAS_DRIVE_EXTENT_INFO,
! 1305: *PCSMI_SAS_DRIVE_EXTENT_INFO;
! 1306:
! 1307: typedef struct _CSMI_SAS_RAID_MODULE_INFO {
! 1308: __u8 bReserved[128];
! 1309: } CSMI_SAS_RAID_MODULE_INFO,
! 1310: *PCSMI_SAS_RAID_MODULE_INFO;
! 1311:
! 1312: typedef struct _CSMI_SAS_DRIVE_LOCATION {
! 1313: __u8 bConnector[16];
! 1314: __u8 bBoxName[16];
! 1315: __u32 uBay;
! 1316: __u8 bReservedBytes[4];
! 1317: __u8 bAttachedSASAddress[8];
! 1318: __u8 bAttachedPhyIdentifier;
! 1319: __u8 bReserved[79];
! 1320: } CSMI_SAS_DRIVE_LOCATION,
! 1321: *PCSMI_SAS_DRIVE_LOCATION;
! 1322:
! 1323: typedef struct _CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA {
! 1324: __u8 bNegotiatedLinkRate[2];
! 1325: __u8 bReserved[126];
! 1326: } CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA,
! 1327: *PCSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA;
! 1328:
! 1329: typedef struct _CSMI_SAS_DRIVE_INFO {
! 1330: CSMI_SAS_RAID_DRIVES Device;
! 1331: CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA Data;
! 1332: CSMI_SAS_DRIVE_LOCATION Location;
! 1333: __u8 bReserved[16];
! 1334: } CSMI_SAS_DRIVE_INFO,
! 1335: *PCSMI_SAS_DRIVE_INFO;
! 1336:
! 1337: typedef struct _CSMI_SAS_RAID_ELEMENT {
! 1338: __u32 uEnumerationType;
! 1339: __u32 uElementIndex;
! 1340: __u32 uNumElements;
! 1341: __u32 uChangeCount;
! 1342: __u32 uSubElementIndex;
! 1343: __u8 bReserved[32];
! 1344: __u32 uFailureCode;
! 1345: __u8 bFailureDescription[80];
! 1346: union {
! 1347: CSMI_SAS_DRIVE_INFO Drive;
! 1348: CSMI_SAS_RAID_MODULE_INFO Module;
! 1349: CSMI_SAS_DRIVE_EXTENT_INFO Extent;
! 1350: } Element;
! 1351: } CSMI_SAS_RAID_ELEMENT,
! 1352: *PCSMI_SAS_RAID_ELEMENT;
! 1353:
! 1354: typedef struct _CSMI_SAS_RAID_ELEMENT_BUFFER {
! 1355: IOCTL_HEADER IoctlHeader;
! 1356: CSMI_SAS_RAID_ELEMENT Information;
! 1357: } CSMI_SAS_RAID_ELEMENT_BUFFER,
! 1358: *PCSMI_SAS_RAID_ELEMENT_BUFFER;
! 1359:
! 1360: // CC_CSMI_SAS_SET_RAID_OPERATION
! 1361:
! 1362: typedef struct _CSMI_SAS_RAID_SET_LIST {
! 1363: __u32 uRaidSetIndex;
! 1364: __u8 bExistingLun[8];
! 1365: __u8 bNewLun[8];
! 1366: __u8 bReserved[12];
! 1367: } CSMI_SAS_RAID_SET_LIST,
! 1368: *PCSMI_SAS_RAID_SET_LIST;
! 1369:
! 1370: typedef struct _CSMI_SAS_RAID_SET_DRIVE_LIST {
! 1371: __u32 uDriveIndex;
! 1372: __u8 bDriveUsage;
! 1373: __u8 bReserved[27];
! 1374: } CSMI_SAS_RAID_SET_DRIVE_LIST,
! 1375: *PCSMI_SAS_RAID_SET_DRIVE_LIST;
! 1376:
! 1377: typedef struct _CSMI_SAS_RAID_SET_SPARE_INFO {
! 1378: __u32 uRaidSetIndex;
! 1379: __u32 uDriveCount;
! 1380: __u8 bApplicationScratchPad[16];
! 1381: __u8 bReserved[104];
! 1382: } CSMI_SAS_RAID_SET_SPARE_INFO,
! 1383: *PCSMI_SAS_RAID_SET_SPARE_INFO;
! 1384:
! 1385: typedef struct _CSMI_SAS_RAID_SET_ONLINE_STATE_INFO {
! 1386: __u32 uRaidSetIndex;
! 1387: __u8 bOnlineState;
! 1388: __u8 bReserved[123];
! 1389: } CSMI_SAS_RAID_SET_ONLINE_STATE_INFO,
! 1390: *PCSMI_SAS_RAID_SET_ONLINE_STATE_INFO;
! 1391:
! 1392: typedef struct _CSMI_SAS_RAID_SET_CACHE_INFO {
! 1393: __u32 uRaidSetIndex;
! 1394: __u8 bCacheSetting;
! 1395: __u8 bCacheRatioFlag;
! 1396: __u8 bCacheRatio;
! 1397: __u8 bReserved[121];
! 1398: } CSMI_SAS_RAID_SET_CACHE_INFO,
! 1399: *PCSMI_SAS_RAID_SET_CACHE_INFO;
! 1400:
! 1401: typedef struct _CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO {
! 1402: __u32 uRaidSetIndex;
! 1403: __u8 bWriteProtectSetting;
! 1404: __u8 bReserved[123];
! 1405: } CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO,
! 1406: *PCSMI_SAS_RAID_SET_WRITE_PROTECT_INFO;
! 1407:
! 1408: typedef struct _CSMI_SAS_RAID_SET_DELETE_INFO {
! 1409: __u32 uRaidSetIndex;
! 1410: __u8 bReserved[124];
! 1411: } CSMI_SAS_RAID_SET_DELETE_INFO,
! 1412: *PCSMI_SAS_RAID_SET_DELETE_INFO;
! 1413:
! 1414: typedef struct _CSMI_SAS_RAID_SET_MODIFY_INFO {
! 1415: __u8 bRaidType;
! 1416: __u8 bReservedBytes[7];
! 1417: __u32 uStripeSize;
! 1418: struct
! 1419: {
! 1420: __u32 uLowPart;
! 1421: __u32 uHighPart;
! 1422: } ulRaidSetBlocks;
! 1423: struct
! 1424: {
! 1425: __u32 uLowPart;
! 1426: __u32 uHighPart;
! 1427: } ulRaidSetExtentOffset;
! 1428: __u32 uDriveCount;
! 1429: __u8 bReserved[96];
! 1430: } CSMI_SAS_RAID_SET_MODIFY_INFO,
! 1431: *PCSMI_SAS_RAID_SET_MODIFY_INFO;
! 1432:
! 1433: typedef struct _CSMI_SAS_RAID_SET_TRANSFORM_INFO {
! 1434: __u8 bTransformType;
! 1435: __u8 bReservedBytes[3];
! 1436: __u32 uRaidSetIndex;
! 1437: __u8 bRaidType;
! 1438: __u8 bReservedBytes2[11];
! 1439: __u32 uAdditionalRaidSetIndex;
! 1440: __u32 uRaidSetCount;
! 1441: __u8 bApplicationScratchPad[16];
! 1442: CSMI_SAS_RAID_SET_MODIFY_INFO Modify;
! 1443: __u8 bReserved[80];
! 1444: } CSMI_SAS_RAID_SET_TRANSFORM_INFO,
! 1445: *PCSMI_SAS_RAID_SET_TRANSFORM_INFO;
! 1446:
! 1447: typedef struct _CSMI_SAS_RAID_SET_LABEL_INFO {
! 1448: __u32 uRaidSetIndex;
! 1449: __u8 bLabel[16];
! 1450: __u8 bReserved[108];
! 1451: } CSMI_SAS_RAID_SET_LABEL_INFO,
! 1452: *PCSMI_SAS_RAID_SET_LABEL_INFO;
! 1453:
! 1454: typedef struct _CSMI_SAS_RAID_SET_CREATE_INFO {
! 1455: __u8 bRaidType;
! 1456: __u8 bReservedBytes[7];
! 1457: __u32 uStripeSize;
! 1458: __u32 uTrackSectorCount;
! 1459: struct
! 1460: {
! 1461: __u32 uLowPart;
! 1462: __u32 uHighPart;
! 1463: } ulRaidSetBlocks;
! 1464: struct
! 1465: {
! 1466: __u32 uLowPart;
! 1467: __u32 uHighPart;
! 1468: } ulRaidSetExtentOffset;
! 1469: __u32 uDriveCount;
! 1470: __u8 bLabel[16];
! 1471: __u32 uRaidSetIndex;
! 1472: __u8 bApplicationScratchPad[16];
! 1473: __u32 uNumberOfHeads;
! 1474: __u32 uNumberOfTracks;
! 1475: __u8 bReserved[48];
! 1476: } CSMI_SAS_RAID_SET_CREATE_INFO,
! 1477: *PCSMI_SAS_RAID_SET_CREATE_INFO;
! 1478:
! 1479: typedef struct _CSMI_SAS_RAID_SET_OPERATION {
! 1480: __u32 uOperationType;
! 1481: __u32 uChangeCount;
! 1482: __u32 uFailureCode;
! 1483: __u8 bFailureDescription[80];
! 1484: __u8 bReserved[28];
! 1485: union {
! 1486: CSMI_SAS_RAID_SET_CREATE_INFO Create;
! 1487: CSMI_SAS_RAID_SET_LABEL_INFO Label;
! 1488: CSMI_SAS_RAID_SET_TRANSFORM_INFO Transform;
! 1489: CSMI_SAS_RAID_SET_DELETE_INFO Delete;
! 1490: CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO Protect;
! 1491: CSMI_SAS_RAID_SET_CACHE_INFO Cache;
! 1492: CSMI_SAS_RAID_SET_ONLINE_STATE_INFO State;
! 1493: CSMI_SAS_RAID_SET_SPARE_INFO Spare;
! 1494: } Operation;
! 1495: union {
! 1496: CSMI_SAS_RAID_SET_DRIVE_LIST DriveList[1];
! 1497: CSMI_SAS_RAID_SET_LIST RaidSetList[1];
! 1498: } Parameters;
! 1499: } CSMI_SAS_RAID_SET_OPERATION,
! 1500: *PCSMI_SAS_RAID_SET_OPERATION;
! 1501:
! 1502: typedef struct _CSMI_SAS_RAID_SET_OPERATION_BUFFER {
! 1503: IOCTL_HEADER IoctlHeader;
! 1504: CSMI_SAS_RAID_SET_OPERATION Information;
! 1505: } CSMI_SAS_RAID_SET_OPERATION_BUFFER,
! 1506: *PCSMI_SAS_RAID_SET_OPERATION_BUFFER;
! 1507:
! 1508: /* * * * * * * * * * SAS HBA Class Structures * * * * * * * * * */
! 1509:
! 1510: // CC_CSMI_SAS_GET_PHY_INFO
! 1511:
! 1512: typedef struct _CSMI_SAS_IDENTIFY {
! 1513: __u8 bDeviceType;
! 1514: __u8 bRestricted;
! 1515: __u8 bInitiatorPortProtocol;
! 1516: __u8 bTargetPortProtocol;
! 1517: __u8 bRestricted2[8];
! 1518: __u8 bSASAddress[8];
! 1519: __u8 bPhyIdentifier;
! 1520: __u8 bSignalClass;
! 1521: __u8 bReserved[6];
! 1522: } CSMI_SAS_IDENTIFY,
! 1523: *PCSMI_SAS_IDENTIFY;
! 1524:
! 1525: typedef struct _CSMI_SAS_PHY_ENTITY {
! 1526: CSMI_SAS_IDENTIFY Identify;
! 1527: __u8 bPortIdentifier;
! 1528: __u8 bNegotiatedLinkRate;
! 1529: __u8 bMinimumLinkRate;
! 1530: __u8 bMaximumLinkRate;
! 1531: __u8 bPhyChangeCount;
! 1532: __u8 bAutoDiscover;
! 1533: __u8 bPhyFeatures;
! 1534: __u8 bReserved;
! 1535: CSMI_SAS_IDENTIFY Attached;
! 1536: } CSMI_SAS_PHY_ENTITY,
! 1537: *PCSMI_SAS_PHY_ENTITY;
! 1538:
! 1539: typedef struct _CSMI_SAS_PHY_INFO {
! 1540: __u8 bNumberOfPhys;
! 1541: __u8 bReserved[3];
! 1542: CSMI_SAS_PHY_ENTITY Phy[32];
! 1543: } CSMI_SAS_PHY_INFO,
! 1544: *PCSMI_SAS_PHY_INFO;
! 1545:
! 1546: typedef struct _CSMI_SAS_PHY_INFO_BUFFER {
! 1547: IOCTL_HEADER IoctlHeader;
! 1548: CSMI_SAS_PHY_INFO Information;
! 1549: } CSMI_SAS_PHY_INFO_BUFFER,
! 1550: *PCSMI_SAS_PHY_INFO_BUFFER;
! 1551:
! 1552: // CC_CSMI_SAS_SET_PHY_INFO
! 1553:
! 1554: typedef struct _CSMI_SAS_SET_PHY_INFO {
! 1555: __u8 bPhyIdentifier;
! 1556: __u8 bNegotiatedLinkRate;
! 1557: __u8 bProgrammedMinimumLinkRate;
! 1558: __u8 bProgrammedMaximumLinkRate;
! 1559: __u8 bSignalClass;
! 1560: __u8 bReserved[3];
! 1561: } CSMI_SAS_SET_PHY_INFO,
! 1562: *PCSMI_SAS_SET_PHY_INFO;
! 1563:
! 1564: typedef struct _CSMI_SAS_SET_PHY_INFO_BUFFER {
! 1565: IOCTL_HEADER IoctlHeader;
! 1566: CSMI_SAS_SET_PHY_INFO Information;
! 1567: } CSMI_SAS_SET_PHY_INFO_BUFFER,
! 1568: *PCSMI_SAS_SET_PHY_INFO_BUFFER;
! 1569:
! 1570: // CC_CSMI_SAS_GET_LINK_ERRORS
! 1571:
! 1572: typedef struct _CSMI_SAS_LINK_ERRORS {
! 1573: __u8 bPhyIdentifier;
! 1574: __u8 bResetCounts;
! 1575: __u8 bReserved[2];
! 1576: __u32 uInvalidDwordCount;
! 1577: __u32 uRunningDisparityErrorCount;
! 1578: __u32 uLossOfDwordSyncCount;
! 1579: __u32 uPhyResetProblemCount;
! 1580: } CSMI_SAS_LINK_ERRORS,
! 1581: *PCSMI_SAS_LINK_ERRORS;
! 1582:
! 1583: typedef struct _CSMI_SAS_LINK_ERRORS_BUFFER {
! 1584: IOCTL_HEADER IoctlHeader;
! 1585: CSMI_SAS_LINK_ERRORS Information;
! 1586: } CSMI_SAS_LINK_ERRORS_BUFFER,
! 1587: *PCSMI_SAS_LINK_ERRORS_BUFFER;
! 1588:
! 1589: // CC_CSMI_SAS_SMP_PASSTHRU
! 1590:
! 1591: typedef struct _CSMI_SAS_SMP_REQUEST {
! 1592: __u8 bFrameType;
! 1593: __u8 bFunction;
! 1594: __u8 bReserved[2];
! 1595: __u8 bAdditionalRequestBytes[1016];
! 1596: } CSMI_SAS_SMP_REQUEST,
! 1597: *PCSMI_SAS_SMP_REQUEST;
! 1598:
! 1599: typedef struct _CSMI_SAS_SMP_RESPONSE {
! 1600: __u8 bFrameType;
! 1601: __u8 bFunction;
! 1602: __u8 bFunctionResult;
! 1603: __u8 bReserved;
! 1604: __u8 bAdditionalResponseBytes[1016];
! 1605: } CSMI_SAS_SMP_RESPONSE,
! 1606: *PCSMI_SAS_SMP_RESPONSE;
! 1607:
! 1608: typedef struct _CSMI_SAS_SMP_PASSTHRU {
! 1609: __u8 bPhyIdentifier;
! 1610: __u8 bPortIdentifier;
! 1611: __u8 bConnectionRate;
! 1612: __u8 bReserved;
! 1613: __u8 bDestinationSASAddress[8];
! 1614: __u32 uRequestLength;
! 1615: CSMI_SAS_SMP_REQUEST Request;
! 1616: __u8 bConnectionStatus;
! 1617: __u8 bReserved2[3];
! 1618: __u32 uResponseBytes;
! 1619: CSMI_SAS_SMP_RESPONSE Response;
! 1620: } CSMI_SAS_SMP_PASSTHRU,
! 1621: *PCSMI_SAS_SMP_PASSTHRU;
! 1622:
! 1623: typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER {
! 1624: IOCTL_HEADER IoctlHeader;
! 1625: CSMI_SAS_SMP_PASSTHRU Parameters;
! 1626: } CSMI_SAS_SMP_PASSTHRU_BUFFER,
! 1627: *PCSMI_SAS_SMP_PASSTHRU_BUFFER;
! 1628:
! 1629: // CC_CSMI_SAS_SSP_PASSTHRU
! 1630:
! 1631: typedef struct _CSMI_SAS_SSP_PASSTHRU {
! 1632: __u8 bPhyIdentifier;
! 1633: __u8 bPortIdentifier;
! 1634: __u8 bConnectionRate;
! 1635: __u8 bReserved;
! 1636: __u8 bDestinationSASAddress[8];
! 1637: __u8 bLun[8];
! 1638: __u8 bCDBLength;
! 1639: __u8 bAdditionalCDBLength;
! 1640: __u8 bReserved2[2];
! 1641: __u8 bCDB[16];
! 1642: __u32 uFlags;
! 1643: __u8 bAdditionalCDB[24];
! 1644: __u32 uDataLength;
! 1645: } CSMI_SAS_SSP_PASSTHRU,
! 1646: *PCSMI_SAS_SSP_PASSTHRU;
! 1647:
! 1648: typedef struct _CSMI_SAS_SSP_PASSTHRU_STATUS {
! 1649: __u8 bConnectionStatus;
! 1650: __u8 bSSPStatus;
! 1651: __u8 bReserved[2];
! 1652: __u8 bDataPresent;
! 1653: __u8 bStatus;
! 1654: __u8 bResponseLength[2];
! 1655: __u8 bResponse[256];
! 1656: __u32 uDataBytes;
! 1657: } CSMI_SAS_SSP_PASSTHRU_STATUS,
! 1658: *PCSMI_SAS_SSP_PASSTHRU_STATUS;
! 1659:
! 1660: typedef struct _CSMI_SAS_SSP_PASSTHRU_BUFFER {
! 1661: IOCTL_HEADER IoctlHeader;
! 1662: CSMI_SAS_SSP_PASSTHRU Parameters;
! 1663: CSMI_SAS_SSP_PASSTHRU_STATUS Status;
! 1664: __u8 bDataBuffer[1];
! 1665: } CSMI_SAS_SSP_PASSTHRU_BUFFER,
! 1666: *PCSMI_SAS_SSP_PASSTHRU_BUFFER;
! 1667:
! 1668: // CC_CSMI_SAS_STP_PASSTHRU
! 1669:
! 1670: typedef struct _CSMI_SAS_STP_PASSTHRU {
! 1671: __u8 bPhyIdentifier;
! 1672: __u8 bPortIdentifier;
! 1673: __u8 bConnectionRate;
! 1674: __u8 bReserved;
! 1675: __u8 bDestinationSASAddress[8];
! 1676: __u8 bReserved2[4];
! 1677: __u8 bCommandFIS[20];
! 1678: __u32 uFlags;
! 1679: __u32 uDataLength;
! 1680: } CSMI_SAS_STP_PASSTHRU,
! 1681: *PCSMI_SAS_STP_PASSTHRU;
! 1682:
! 1683: typedef struct _CSMI_SAS_STP_PASSTHRU_STATUS {
! 1684: __u8 bConnectionStatus;
! 1685: __u8 bReserved[3];
! 1686: __u8 bStatusFIS[20];
! 1687: __u32 uSCR[16];
! 1688: __u32 uDataBytes;
! 1689: } CSMI_SAS_STP_PASSTHRU_STATUS,
! 1690: *PCSMI_SAS_STP_PASSTHRU_STATUS;
! 1691:
! 1692: typedef struct _CSMI_SAS_STP_PASSTHRU_BUFFER {
! 1693: IOCTL_HEADER IoctlHeader;
! 1694: CSMI_SAS_STP_PASSTHRU Parameters;
! 1695: CSMI_SAS_STP_PASSTHRU_STATUS Status;
! 1696: __u8 bDataBuffer[1];
! 1697: } CSMI_SAS_STP_PASSTHRU_BUFFER,
! 1698: *PCSMI_SAS_STP_PASSTHRU_BUFFER;
! 1699:
! 1700: // CC_CSMI_SAS_GET_SATA_SIGNATURE
! 1701:
! 1702: typedef struct _CSMI_SAS_SATA_SIGNATURE {
! 1703: __u8 bPhyIdentifier;
! 1704: __u8 bReserved[3];
! 1705: __u8 bSignatureFIS[20];
! 1706: } CSMI_SAS_SATA_SIGNATURE,
! 1707: *PCSMI_SAS_SATA_SIGNATURE;
! 1708:
! 1709: typedef struct _CSMI_SAS_SATA_SIGNATURE_BUFFER {
! 1710: IOCTL_HEADER IoctlHeader;
! 1711: CSMI_SAS_SATA_SIGNATURE Signature;
! 1712: } CSMI_SAS_SATA_SIGNATURE_BUFFER,
! 1713: *PCSMI_SAS_SATA_SIGNATURE_BUFFER;
! 1714:
! 1715: // CC_CSMI_SAS_GET_SCSI_ADDRESS
! 1716:
! 1717: typedef struct _CSMI_SAS_GET_SCSI_ADDRESS_BUFFER {
! 1718: IOCTL_HEADER IoctlHeader;
! 1719: __u8 bSASAddress[8];
! 1720: __u8 bSASLun[8];
! 1721: __u8 bHostIndex;
! 1722: __u8 bPathId;
! 1723: __u8 bTargetId;
! 1724: __u8 bLun;
! 1725: } CSMI_SAS_GET_SCSI_ADDRESS_BUFFER,
! 1726: *PCSMI_SAS_GET_SCSI_ADDRESS_BUFFER;
! 1727:
! 1728: // CC_CSMI_SAS_GET_DEVICE_ADDRESS
! 1729:
! 1730: typedef struct _CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER {
! 1731: IOCTL_HEADER IoctlHeader;
! 1732: __u8 bHostIndex;
! 1733: __u8 bPathId;
! 1734: __u8 bTargetId;
! 1735: __u8 bLun;
! 1736: __u8 bSASAddress[8];
! 1737: __u8 bSASLun[8];
! 1738: } CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER,
! 1739: *PCSMI_SAS_GET_DEVICE_ADDRESS_BUFFER;
! 1740:
! 1741: // CC_CSMI_SAS_TASK_MANAGEMENT
! 1742:
! 1743: typedef struct _CSMI_SAS_SSP_TASK_IU {
! 1744: __u8 bHostIndex;
! 1745: __u8 bPathId;
! 1746: __u8 bTargetId;
! 1747: __u8 bLun;
! 1748: __u32 uFlags;
! 1749: __u32 uQueueTag;
! 1750: __u32 uReserved;
! 1751: __u8 bTaskManagementFunction;
! 1752: __u8 bReserved[7];
! 1753: __u32 uInformation;
! 1754: } CSMI_SAS_SSP_TASK_IU,
! 1755: *PCSMI_SAS_SSP_TASK_IU;
! 1756:
! 1757: typedef struct _CSMI_SAS_SSP_TASK_IU_BUFFER {
! 1758: IOCTL_HEADER IoctlHeader;
! 1759: CSMI_SAS_SSP_TASK_IU Parameters;
! 1760: CSMI_SAS_SSP_PASSTHRU_STATUS Status;
! 1761: } CSMI_SAS_SSP_TASK_IU_BUFFER,
! 1762: *PCSMI_SAS_SSP_TASK_IU_BUFFER;
! 1763:
! 1764: // CC_CSMI_SAS_GET_CONNECTOR_INFO
! 1765:
! 1766: typedef struct _CSMI_SAS_GET_CONNECTOR_INFO {
! 1767: __u32 uPinout;
! 1768: __u8 bConnector[16];
! 1769: __u8 bLocation;
! 1770: __u8 bReserved[15];
! 1771: } CSMI_SAS_CONNECTOR_INFO,
! 1772: *PCSMI_SAS_CONNECTOR_INFO;
! 1773:
! 1774: typedef struct _CSMI_SAS_CONNECTOR_INFO_BUFFER {
! 1775: IOCTL_HEADER IoctlHeader;
! 1776: CSMI_SAS_CONNECTOR_INFO Reference[32];
! 1777: } CSMI_SAS_CONNECTOR_INFO_BUFFER,
! 1778: *PCSMI_SAS_CONNECTOR_INFO_BUFFER;
! 1779:
! 1780: // CC_CSMI_SAS_GET_LOCATION
! 1781:
! 1782: typedef struct _CSMI_SAS_LOCATION_IDENTIFIER {
! 1783: __u32 bLocationFlags;
! 1784: __u8 bSASAddress[8];
! 1785: __u8 bSASLun[8];
! 1786: __u8 bEnclosureIdentifier[8];
! 1787: __u8 bEnclosureName[32];
! 1788: __u8 bBayPrefix[32];
! 1789: __u8 bBayIdentifier;
! 1790: __u8 bLocationState;
! 1791: __u8 bReserved[2];
! 1792: } CSMI_SAS_LOCATION_IDENTIFIER,
! 1793: *PCSMI_SAS_LOCATION_IDENTIFIER;
! 1794:
! 1795: typedef struct _CSMI_SAS_GET_LOCATION_BUFFER {
! 1796: IOCTL_HEADER IoctlHeader;
! 1797: __u8 bHostIndex;
! 1798: __u8 bPathId;
! 1799: __u8 bTargetId;
! 1800: __u8 bLun;
! 1801: __u8 bIdentify;
! 1802: __u8 bNumberOfLocationIdentifiers;
! 1803: __u8 bLengthOfLocationIdentifier;
! 1804: CSMI_SAS_LOCATION_IDENTIFIER Location[1];
! 1805: } CSMI_SAS_GET_LOCATION_BUFFER,
! 1806: *PCSMI_SAS_GET_LOCATION_BUFFER;
! 1807:
! 1808: // CC_CSMI_SAS_PHY_CONTROL
! 1809:
! 1810: typedef struct _CSMI_SAS_CHARACTER {
! 1811: __u8 bTypeFlags;
! 1812: __u8 bValue;
! 1813: } CSMI_SAS_CHARACTER,
! 1814: *PCSMI_SAS_CHARACTER;
! 1815:
! 1816: typedef struct _CSMI_SAS_PHY_CONTROL {
! 1817: __u8 bType;
! 1818: __u8 bRate;
! 1819: __u8 bReserved[6];
! 1820: __u32 uVendorUnique[8];
! 1821: __u32 uTransmitterFlags;
! 1822: __i8 bTransmitAmplitude;
! 1823: __i8 bTransmitterPreemphasis;
! 1824: __i8 bTransmitterSlewRate;
! 1825: __i8 bTransmitterReserved[13];
! 1826: __u8 bTransmitterVendorUnique[64];
! 1827: __u32 uReceiverFlags;
! 1828: __i8 bReceiverThreshold;
! 1829: __i8 bReceiverEqualizationGain;
! 1830: __i8 bReceiverReserved[14];
! 1831: __u8 bReceiverVendorUnique[64];
! 1832: __u32 uPatternFlags;
! 1833: __u8 bFixedPattern;
! 1834: __u8 bUserPatternLength;
! 1835: __u8 bPatternReserved[6];
! 1836: CSMI_SAS_CHARACTER UserPatternBuffer[16];
! 1837: } CSMI_SAS_PHY_CONTROL,
! 1838: *PCSMI_SAS_PHY_CONTROL;
! 1839:
! 1840: typedef struct _CSMI_SAS_PHY_CONTROL_BUFFER {
! 1841: IOCTL_HEADER IoctlHeader;
! 1842: __u32 uFunction;
! 1843: __u8 bPhyIdentifier;
! 1844: __u16 usLengthOfControl;
! 1845: __u8 bNumberOfControls;
! 1846: __u8 bReserved[4];
! 1847: __u32 uLinkFlags;
! 1848: __u8 bSpinupRate;
! 1849: __u8 bLinkReserved[7];
! 1850: __u32 uVendorUnique[8];
! 1851: CSMI_SAS_PHY_CONTROL Control[1];
! 1852: } CSMI_SAS_PHY_CONTROL_BUFFER,
! 1853: *PCSMI_SAS_PHY_CONTROL_BUFFER;
! 1854:
! 1855: //EDM #pragma CSMI_SAS_END_PACK
! 1856: #pragma pack()
! 1857:
! 1858: #endif // _CSMI_SAS_H_
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>