17c478bd9Sstevel@tonic-gate /* 2ef287aadSGreg Price * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate #ifndef _SYS_MPI_CNFG_H 77c478bd9Sstevel@tonic-gate #define _SYS_MPI_CNFG_H 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate #ifdef __cplusplus 107c478bd9Sstevel@tonic-gate extern "C" { 117c478bd9Sstevel@tonic-gate #endif 127c478bd9Sstevel@tonic-gate 137c478bd9Sstevel@tonic-gate /* 147c478bd9Sstevel@tonic-gate * Config Message and Structures 157c478bd9Sstevel@tonic-gate */ 167c478bd9Sstevel@tonic-gate typedef struct config_page_header { 177c478bd9Sstevel@tonic-gate uint8_t PageVersion; 187c478bd9Sstevel@tonic-gate uint8_t PageLength; 197c478bd9Sstevel@tonic-gate uint8_t PageNumber; 207c478bd9Sstevel@tonic-gate uint8_t PageType; 217c478bd9Sstevel@tonic-gate } config_page_header_t; 227c478bd9Sstevel@tonic-gate 237c478bd9Sstevel@tonic-gate typedef union config_page_header_union { 247c478bd9Sstevel@tonic-gate config_page_header_t Struct; 257c478bd9Sstevel@tonic-gate uint8_t Bytes[4]; 267c478bd9Sstevel@tonic-gate uint16_t Word16[2]; 277c478bd9Sstevel@tonic-gate uint32_t Word32; 287c478bd9Sstevel@tonic-gate } config_page_header_union_t; 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate /* 317c478bd9Sstevel@tonic-gate * The extended header is used for 1064 and on 327c478bd9Sstevel@tonic-gate */ 337c478bd9Sstevel@tonic-gate typedef struct config_extended_page_header { 347c478bd9Sstevel@tonic-gate uint8_t PageVersion; 357c478bd9Sstevel@tonic-gate uint8_t Reserved1; 367c478bd9Sstevel@tonic-gate uint8_t PageNumber; 377c478bd9Sstevel@tonic-gate uint8_t PageType; 387c478bd9Sstevel@tonic-gate uint16_t ExtPageLength; 397c478bd9Sstevel@tonic-gate uint8_t ExtPageType; 407c478bd9Sstevel@tonic-gate uint8_t Reserved2; 417c478bd9Sstevel@tonic-gate } config_extended_page_header_t; 427c478bd9Sstevel@tonic-gate 437c478bd9Sstevel@tonic-gate /* 447c478bd9Sstevel@tonic-gate * PageType field values 457c478bd9Sstevel@tonic-gate */ 467c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGEATTR_READ_ONLY 0x00 477c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGEATTR_CHANGEABLE 0x10 487c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGEATTR_PERSISTENT 0x20 497c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGEATTR_RO_PERSISTENT 0x30 507c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGEATTR_MASK 0xF0 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_IO_UNIT 0x00 537c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_IOC 0x01 547c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_BIOS 0x02 557c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_SCSI_PORT 0x03 567c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_SCSI_DEVICE 0x04 577c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_FC_PORT 0x05 587c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_FC_DEVICE 0x06 597c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_LAN 0x07 607c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_RAID_VOLUME 0x08 617c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_MANUFACTURING 0x09 627c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_RAID_PHYSDISK 0x0A 637c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_INBAND 0x0B 647c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_EXTENDED 0x0F 657c478bd9Sstevel@tonic-gate #define MPI_CONFIG_PAGETYPE_MASK 0x0F 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate #define MPI_CONFIG_TYPENUM_MASK 0x0FFF 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate /* 707c478bd9Sstevel@tonic-gate * ExtPageType field values 717c478bd9Sstevel@tonic-gate */ 727c478bd9Sstevel@tonic-gate #define MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT 0x10 737c478bd9Sstevel@tonic-gate #define MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER 0x11 747c478bd9Sstevel@tonic-gate #define MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE 0x12 757c478bd9Sstevel@tonic-gate #define MPI_CONFIG_EXTPAGETYPE_SAS_PHY 0x13 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate /* 787c478bd9Sstevel@tonic-gate * Page Address field values 797c478bd9Sstevel@tonic-gate */ 807c478bd9Sstevel@tonic-gate #define MPI_SCSI_PORT_PGAD_PORT_MASK 0x000000FF 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gate #define MPI_SCSI_DEVICE_TARGET_ID_MASK 0x000000FF 837c478bd9Sstevel@tonic-gate #define MPI_SCSI_DEVICE_TARGET_ID_SHIFT 0 847c478bd9Sstevel@tonic-gate #define MPI_SCSI_DEVICE_BUS_MASK 0x0000FF00 857c478bd9Sstevel@tonic-gate #define MPI_SCSI_DEVICE_BUS_SHIFT 8 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PGAD_PORT_MASK 0xF0000000 887c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PGAD_PORT_SHIFT 28 897c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PGAD_FORM_MASK 0x0F000000 907c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PGAD_FORM_INDEX 0x01000000 917c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PGAD_INDEX_MASK 0x0000FFFF 927c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PGAD_INDEX_SHIFT 0 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_PORT_MASK 0xF0000000 957c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_PORT_SHIFT 28 967c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_FORM_MASK 0x0F000000 977c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_FORM_NEXT_DID 0x00000000 987c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_ND_PORT_MASK 0xF0000000 997c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_ND_PORT_SHIFT 28 1007c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_ND_DID_MASK 0x00FFFFFF 1017c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_ND_DID_SHIFT 0 1027c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_FORM_BUS_TID 0x01000000 1037c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_BT_BUS_MASK 0x0000FF00 1047c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT 8 1057c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_BT_TID_MASK 0x000000FF 1067c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PGAD_BT_TID_SHIFT 0 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK_PGAD_PHYSDISKNUM_MASK 0x000000FF 1097c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK_PGAD_PHYSDISKNUM_SHIFT 0 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_FORM_MASK 0xF0000000 1127c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_FORM_SHIFT 28 1137c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_FORM_GET_NEXT_HANDLE 0x00000000 1147c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_FORM_HANDLE_PHY_NUM 0x00000001 1157c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_FORM_HANDLE 0x00000002 1167c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_GNH_MASK_HANDLE 0x0000FFFF 1177c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_GNH_SHIFT_HANDLE 0 1187c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_HPN_MASK_PHY 0x00FF0000 1197c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_HPN_SHIFT_PHY 16 1207c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_HPN_MASK_HANDLE 0x0000FFFF 1217c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_HPN_SHIFT_HANDLE 0 1227c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_H_MASK_HANDLE 0x0000FFFF 1237c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPAND_PGAD_H_SHIFT_HANDLE 0 1247c478bd9Sstevel@tonic-gate 1257c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_FORM_MASK 0xF0000000 1267c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_FORM_SHIFT 28 1277c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE 0x00000000 1287c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID 0x00000001 1297c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_FORM_HANDLE 0x00000002 1307c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_GNH_HANDLE_MASK 0x0000FFFF 1317c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_GNH_HANDLE_SHIFT 0 1327c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_BT_BUS_MASK 0x0000FF00 1337c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_BT_BUS_SHIFT 8 1347c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_BT_TID_MASK 0x000000FF 1357c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_BT_TID_SHIFT 0 1367c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_H_HANDLE_MASK 0x0000FFFF 1377c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE_PGAD_H_HANDLE_SHIFT 0 1387c478bd9Sstevel@tonic-gate 1397c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY_PGAD_PHY_NUMBER_MASK 0x000000FF 1407c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY_PGAD_PHY_NUMBER_SHIFT 0 1417c478bd9Sstevel@tonic-gate 1427c478bd9Sstevel@tonic-gate /* 1437c478bd9Sstevel@tonic-gate * Config Message 1447c478bd9Sstevel@tonic-gate */ 1457c478bd9Sstevel@tonic-gate typedef struct msg_config { 1467c478bd9Sstevel@tonic-gate uint8_t Action; 1477c478bd9Sstevel@tonic-gate uint8_t Reserved; 1487c478bd9Sstevel@tonic-gate uint8_t ChainOffset; 1497c478bd9Sstevel@tonic-gate uint8_t Function; 1507c478bd9Sstevel@tonic-gate uint16_t ExtPageLength; /* 1064 only */ 1517c478bd9Sstevel@tonic-gate uint8_t ExtPageType; /* 1064 only */ 1527c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 1537c478bd9Sstevel@tonic-gate uint32_t MsgContext; 1547c478bd9Sstevel@tonic-gate uint8_t Reserved2[8]; 1557c478bd9Sstevel@tonic-gate config_page_header_t Header; 1567c478bd9Sstevel@tonic-gate uint32_t PageAddress; 1577c478bd9Sstevel@tonic-gate sge_io_union_t PageBufferSGE; 1587c478bd9Sstevel@tonic-gate } msg_config_t; 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate /* 1617c478bd9Sstevel@tonic-gate * Action field values 1627c478bd9Sstevel@tonic-gate */ 1637c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_HEADER 0x00 1647c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_READ_CURRENT 0x01 1657c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT 0x02 1667c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_DEFAULT 0x03 1677c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM 0x04 1687c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_READ_DEFAULT 0x05 1697c478bd9Sstevel@tonic-gate #define MPI_CONFIG_ACTION_PAGE_READ_NVRAM 0x06 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate /* 1727c478bd9Sstevel@tonic-gate * Config Reply Message 1737c478bd9Sstevel@tonic-gate */ 1747c478bd9Sstevel@tonic-gate typedef struct msg_config_reply { 1757c478bd9Sstevel@tonic-gate uint8_t Action; 1767c478bd9Sstevel@tonic-gate uint8_t Reserved; 1777c478bd9Sstevel@tonic-gate uint8_t MsgLength; 1787c478bd9Sstevel@tonic-gate uint8_t Function; 1797c478bd9Sstevel@tonic-gate uint16_t ExtPageLength; 1807c478bd9Sstevel@tonic-gate uint8_t ExtPageType; 1817c478bd9Sstevel@tonic-gate uint8_t MsgFlags; 1827c478bd9Sstevel@tonic-gate uint32_t MsgContext; 1837c478bd9Sstevel@tonic-gate uint8_t Reserved2[2]; 1847c478bd9Sstevel@tonic-gate uint16_t IOCStatus; 1857c478bd9Sstevel@tonic-gate uint32_t IOCLogInfo; 1867c478bd9Sstevel@tonic-gate config_page_header_t Header; 1877c478bd9Sstevel@tonic-gate } msg_config_reply_t; 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate /* 1907c478bd9Sstevel@tonic-gate * Manufacturing Config pages 1917c478bd9Sstevel@tonic-gate */ 1927c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_VENDORID_LSILOGIC 0x1000 1937c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVICEID_FC909 0x0621 1947c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVICEID_FC919 0x0624 1957c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVICEID_FC929 0x0622 1967c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVICEID_FC919X 0x0628 1977c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVICEID_FC929X 0x0626 1987c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_53C1030 0x0030 1997c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_53C1030ZC 0x0031 2007c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_1030_53C1035 0x0032 2017c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_1030ZC_53C1035 0x0033 2027c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_53C1035 0x0040 2037c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_53C1035ZC 0x0041 2047c478bd9Sstevel@tonic-gate #define MPI_MANUFACTPAGE_DEVID_SAS1064 0x0050 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_0 { 2077c478bd9Sstevel@tonic-gate config_page_header_t Header; 2087c478bd9Sstevel@tonic-gate uint8_t ChipName[16]; 2097c478bd9Sstevel@tonic-gate uint8_t ChipRevision[8]; 2107c478bd9Sstevel@tonic-gate uint8_t BoardName[16]; 2117c478bd9Sstevel@tonic-gate uint8_t BoardAssembly[16]; 2127c478bd9Sstevel@tonic-gate uint8_t BoardTracerNumber[16]; 2137c478bd9Sstevel@tonic-gate } config_page_manufacturing_0_t; 2147c478bd9Sstevel@tonic-gate 2157c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING0_PAGEVERSION 0x00 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_1 { 2187c478bd9Sstevel@tonic-gate config_page_header_t Header; 2197c478bd9Sstevel@tonic-gate uint8_t VPD[256]; 2207c478bd9Sstevel@tonic-gate } config_page_manufacturing_1_t; 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING1_PAGEVERSION 0x00 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate typedef struct mpi_chip_revision_id { 2257c478bd9Sstevel@tonic-gate uint16_t DeviceID; 2267c478bd9Sstevel@tonic-gate uint8_t PCIRevisionID; 2277c478bd9Sstevel@tonic-gate uint8_t Reserved; 2287c478bd9Sstevel@tonic-gate } mpi_chip_revision_id_t; 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gate /* 2317c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 2327c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 2337c478bd9Sstevel@tonic-gate */ 2347c478bd9Sstevel@tonic-gate #ifndef MPI_MAN_PAGE_2_HW_SETTINGS_WORDS 2357c478bd9Sstevel@tonic-gate #define MPI_MAN_PAGE_2_HW_SETTINGS_WORDS 1 2367c478bd9Sstevel@tonic-gate #endif 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_2 { 2397c478bd9Sstevel@tonic-gate config_page_header_t Header; 2407c478bd9Sstevel@tonic-gate mpi_chip_revision_id_t ChipId; 2417c478bd9Sstevel@tonic-gate uint32_t HwSettings[MPI_MAN_PAGE_2_HW_SETTINGS_WORDS]; 2427c478bd9Sstevel@tonic-gate } config_page_manufacturing_2_t; 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING2_PAGEVERSION 0x00 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate /* 2477c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 2487c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 2497c478bd9Sstevel@tonic-gate */ 2507c478bd9Sstevel@tonic-gate #ifndef MPI_MAN_PAGE_3_INFO_WORDS 2517c478bd9Sstevel@tonic-gate #define MPI_MAN_PAGE_3_INFO_WORDS 1 2527c478bd9Sstevel@tonic-gate #endif 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_3 { 2557c478bd9Sstevel@tonic-gate config_page_header_t Header; 2567c478bd9Sstevel@tonic-gate mpi_chip_revision_id_t ChipId; 2577c478bd9Sstevel@tonic-gate uint32_t Info[MPI_MAN_PAGE_3_INFO_WORDS]; 2587c478bd9Sstevel@tonic-gate } config_page_manufacturing_3_t; 2597c478bd9Sstevel@tonic-gate 2607c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING3_PAGEVERSION 0x00 2617c478bd9Sstevel@tonic-gate 2627c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_4 { 2637c478bd9Sstevel@tonic-gate config_page_header_t Header; 2647c478bd9Sstevel@tonic-gate uint32_t Reserved1; 2657c478bd9Sstevel@tonic-gate uint8_t InfoOffset0; 2667c478bd9Sstevel@tonic-gate uint8_t InfoSize0; 2677c478bd9Sstevel@tonic-gate uint8_t InfoOffset1; 2687c478bd9Sstevel@tonic-gate uint8_t InfoSize1; 2697c478bd9Sstevel@tonic-gate uint8_t InquirySize; 2707c478bd9Sstevel@tonic-gate uint8_t Flags; 2717c478bd9Sstevel@tonic-gate uint16_t Reserved2; 2727c478bd9Sstevel@tonic-gate uint8_t InquiryData[56]; 2737c478bd9Sstevel@tonic-gate uint32_t ISVolumeSettings; 2747c478bd9Sstevel@tonic-gate uint32_t IMEVolumeSettings; 2757c478bd9Sstevel@tonic-gate uint32_t IMVolumeSettings; 2767c478bd9Sstevel@tonic-gate } config_page_manufacturing_4_t; 2777c478bd9Sstevel@tonic-gate 2787c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING4_PAGEVERSION 0x01 2797c478bd9Sstevel@tonic-gate #define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA 0x01 2807c478bd9Sstevel@tonic-gate 2817c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_5 { 2827c478bd9Sstevel@tonic-gate config_page_header_t Header; 2837c478bd9Sstevel@tonic-gate uint64_t BaseWWID; 2847c478bd9Sstevel@tonic-gate } config_page_manufacturing_5_t; 2857c478bd9Sstevel@tonic-gate 2867c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING5_PAGEVERSION 0x00 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate typedef struct config_page_manufacturing_6 { 2897c478bd9Sstevel@tonic-gate config_page_header_t Header; 2907c478bd9Sstevel@tonic-gate uint32_t ProductSpecificInfo; 2917c478bd9Sstevel@tonic-gate } config_page_manufacturing_6_t; 2927c478bd9Sstevel@tonic-gate 2937c478bd9Sstevel@tonic-gate #define MPI_MANUFACTURING6_PAGEVERSION 0x00 2947c478bd9Sstevel@tonic-gate 2957c478bd9Sstevel@tonic-gate /* 2967c478bd9Sstevel@tonic-gate * IO Unit Config Pages 2977c478bd9Sstevel@tonic-gate */ 2987c478bd9Sstevel@tonic-gate typedef struct config_page_io_unit_0 { 2997c478bd9Sstevel@tonic-gate config_page_header_t Header; 3007c478bd9Sstevel@tonic-gate uint64_t UniqueValue; 3017c478bd9Sstevel@tonic-gate } config_page_io_unit_0_t; 3027c478bd9Sstevel@tonic-gate 3037c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE0_PAGEVERSION 0x00 3047c478bd9Sstevel@tonic-gate 3057c478bd9Sstevel@tonic-gate typedef struct config_page_io_unit_1 { 3067c478bd9Sstevel@tonic-gate config_page_header_t Header; 3077c478bd9Sstevel@tonic-gate uint32_t Flags; 3087c478bd9Sstevel@tonic-gate } config_page_io_unit_1_t; 3097c478bd9Sstevel@tonic-gate 3107c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_PAGEVERSION 0x01 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_MULTI_FUNCTION 0x00000000 3137c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_SINGLE_FUNCTION 0x00000001 3147c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_MULTI_PATHING 0x00000002 3157c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_SINGLE_PATHING 0x00000000 3167c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID 0x00000004 3177c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_DISABLE_QUEUE_FULL_HANDLING 0x00000020 3187c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_DISABLE_IR 0x00000040 3197c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_FORCE_32 0x00000080 3207c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE 0x00000100 3217c478bd9Sstevel@tonic-gate 3227c478bd9Sstevel@tonic-gate typedef struct mpi_adapter_info { 3237c478bd9Sstevel@tonic-gate uint8_t PciBusNumber; 3247c478bd9Sstevel@tonic-gate uint8_t PciDeviceAndFunctionNumber; 3257c478bd9Sstevel@tonic-gate uint16_t AdapterFlags; 3267c478bd9Sstevel@tonic-gate } mpi_adapter_info_t; 3277c478bd9Sstevel@tonic-gate 3287c478bd9Sstevel@tonic-gate #define MPI_ADAPTER_INFO_FLAGS_EMBEDDED 0x0001 3297c478bd9Sstevel@tonic-gate #define MPI_ADAPTER_INFO_FLAGS_INIT_STATUS 0x0002 3307c478bd9Sstevel@tonic-gate 3317c478bd9Sstevel@tonic-gate typedef struct config_page_io_unit_2 { 3327c478bd9Sstevel@tonic-gate config_page_header_t Header; 3337c478bd9Sstevel@tonic-gate uint32_t Flags; 3347c478bd9Sstevel@tonic-gate uint32_t BiosVersion; 3357c478bd9Sstevel@tonic-gate mpi_adapter_info_t AdapterOrder[4]; 3367c478bd9Sstevel@tonic-gate } config_page_io_unit_2_t; 3377c478bd9Sstevel@tonic-gate 3387c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_PAGEVERSION 0x00 3397c478bd9Sstevel@tonic-gate 3407c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_PAUSE_ON_ERROR 0x00000002 3417c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_VERBOSE_ENABLE 0x00000004 3427c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_COLOR_VIDEO_DISABLE 0x00000008 3437c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_DONT_HOOK_INT_40 0x00000010 3447c478bd9Sstevel@tonic-gate 3457c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_DEV_LIST_DISPLAY_MASK 0x000000E0 3467c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_INSTALLED_DEV_DISPLAY 0x00000000 3477c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_ADAPTER_DISPLAY 0x00000020 3487c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE2_FLAGS_ADAPTER_DEV_DISPLAY 0x00000040 3497c478bd9Sstevel@tonic-gate 3507c478bd9Sstevel@tonic-gate /* 3517c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 3527c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 3537c478bd9Sstevel@tonic-gate */ 3547c478bd9Sstevel@tonic-gate #ifndef MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX 3557c478bd9Sstevel@tonic-gate #define MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX 1 3567c478bd9Sstevel@tonic-gate #endif 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gate typedef struct config_page_io_unit_3 { 3597c478bd9Sstevel@tonic-gate config_page_header_t Header; 3607c478bd9Sstevel@tonic-gate uint8_t GPIOCount; 3617c478bd9Sstevel@tonic-gate uint8_t Reserved1; 3627c478bd9Sstevel@tonic-gate uint16_t Reserved2; 3637c478bd9Sstevel@tonic-gate uint16_t GPIOVal[MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX]; 3647c478bd9Sstevel@tonic-gate } config_page_io_unit_3_t; 3657c478bd9Sstevel@tonic-gate 3667c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE3_PAGEVERSION 0x01 3677c478bd9Sstevel@tonic-gate 3687c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE3_GPIO_FUNCTION_MASK 0xFC 3697c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE3_GPIO_FUNCTION_SHIFT 2 3707c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE3_GPIO_SETTING_OFF 0x00 3717c478bd9Sstevel@tonic-gate #define MPI_IOUNITPAGE3_GPIO_SETTING_ON 0x01 3727c478bd9Sstevel@tonic-gate 3737c478bd9Sstevel@tonic-gate /* 3747c478bd9Sstevel@tonic-gate * IOC Config Pages 3757c478bd9Sstevel@tonic-gate */ 3767c478bd9Sstevel@tonic-gate typedef struct config_page_ioc_0 { 3777c478bd9Sstevel@tonic-gate config_page_header_t Header; 3787c478bd9Sstevel@tonic-gate uint32_t TotalNVStore; 3797c478bd9Sstevel@tonic-gate uint32_t FreeNVStore; 3807c478bd9Sstevel@tonic-gate uint16_t VendorID; 3817c478bd9Sstevel@tonic-gate uint16_t DeviceID; 3827c478bd9Sstevel@tonic-gate uint8_t RevisionID; 3837c478bd9Sstevel@tonic-gate uint8_t Reserved[3]; 3847c478bd9Sstevel@tonic-gate uint32_t ClassCode; 3857c478bd9Sstevel@tonic-gate uint16_t SubsystemVendorID; 3867c478bd9Sstevel@tonic-gate uint16_t SubsystemID; 3877c478bd9Sstevel@tonic-gate } config_page_ioc_0_t; 3887c478bd9Sstevel@tonic-gate 3897c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE0_PAGEVERSION 0x01 3907c478bd9Sstevel@tonic-gate 3917c478bd9Sstevel@tonic-gate typedef struct config_page_ioc_1 { 3927c478bd9Sstevel@tonic-gate config_page_header_t Header; 3937c478bd9Sstevel@tonic-gate uint32_t Flags; 3947c478bd9Sstevel@tonic-gate uint32_t CoalescingTimeout; 3957c478bd9Sstevel@tonic-gate uint8_t CoalescingDepth; 3967c478bd9Sstevel@tonic-gate uint8_t PCISlotNum; 3977c478bd9Sstevel@tonic-gate uint8_t Reserved[2]; 3987c478bd9Sstevel@tonic-gate } config_page_ioc_1_t; 3997c478bd9Sstevel@tonic-gate 4007c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_PAGEVERSION 0x01 4017c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_EEDP_HOST_SUPPORTS_DIF 0x08000000 4027c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_EEDP_MODE_MASK 0x07000000 4037c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_EEDP_MODE_OFF 0x00000000 4047c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_EEDP_MODE_T10 0x01000000 4057c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_EEDP_MODE_LSI_1 0x02000000 4067c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_EEDP_MODE_LSI_2 0x03000000 4077c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_REPLY_COALESCING 0x00000001 4087c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE1_PCISLOTNUM_UNKNOWN 0xFF 4097c478bd9Sstevel@tonic-gate 4107c478bd9Sstevel@tonic-gate typedef struct config_page_ioc_2_raid_vol { 4117c478bd9Sstevel@tonic-gate uint8_t VolumeID; 4127c478bd9Sstevel@tonic-gate uint8_t VolumeBus; 4137c478bd9Sstevel@tonic-gate uint8_t VolumeIOC; 4147c478bd9Sstevel@tonic-gate uint8_t VolumePageNumber; 4157c478bd9Sstevel@tonic-gate uint8_t VolumeType; 4167c478bd9Sstevel@tonic-gate uint8_t Flags; 4177c478bd9Sstevel@tonic-gate uint16_t Reserved3; 4187c478bd9Sstevel@tonic-gate } config_page_ioc_2_raid_vol_t; 4197c478bd9Sstevel@tonic-gate 4207c478bd9Sstevel@tonic-gate #define MPI_RAID_VOL_TYPE_IS 0x00 4217c478bd9Sstevel@tonic-gate #define MPI_RAID_VOL_TYPE_IME 0x01 4227c478bd9Sstevel@tonic-gate #define MPI_RAID_VOL_TYPE_IM 0x02 4237c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE 0x08 4247c478bd9Sstevel@tonic-gate 4257c478bd9Sstevel@tonic-gate /* 4267c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 4277c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 4287c478bd9Sstevel@tonic-gate */ 4297c478bd9Sstevel@tonic-gate #ifndef MPI_IOC_PAGE_2_RAID_VOLUME_MAX 4307c478bd9Sstevel@tonic-gate #define MPI_IOC_PAGE_2_RAID_VOLUME_MAX 1 4317c478bd9Sstevel@tonic-gate #endif 4327c478bd9Sstevel@tonic-gate 4337c478bd9Sstevel@tonic-gate typedef struct config_page_ioc_2 { 4347c478bd9Sstevel@tonic-gate config_page_header_t Header; 4357c478bd9Sstevel@tonic-gate uint32_t CapabilitiesFlags; 4367c478bd9Sstevel@tonic-gate uint8_t NumActiveVolumes; 4377c478bd9Sstevel@tonic-gate uint8_t MaxVolumes; 4387c478bd9Sstevel@tonic-gate uint8_t NumActivePhysDisks; 4397c478bd9Sstevel@tonic-gate uint8_t MaxPhysDisks; 4407c478bd9Sstevel@tonic-gate config_page_ioc_2_raid_vol_t RaidVolume[MPI_IOC_PAGE_2_RAID_VOLUME_MAX]; 4417c478bd9Sstevel@tonic-gate } config_page_ioc_2_t; 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_PAGEVERSION 0x02 4447c478bd9Sstevel@tonic-gate 4457c478bd9Sstevel@tonic-gate /* 4467c478bd9Sstevel@tonic-gate * IOC Page 2 Capabilities flags 4477c478bd9Sstevel@tonic-gate */ 4487c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_CAP_FLAGS_IS_SUPPORT 0x00000001 4497c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_CAP_FLAGS_IME_SUPPORT 0x00000002 4507c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_CAP_FLAGS_IM_SUPPORT 0x00000004 4517c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_CAP_FLAGS_SES_SUPPORT 0x20000000 4527c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_CAP_FLAGS_SAFTE_SUPPORT 0x40000000 4537c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE2_CAP_FLAGS_CROSS_CHANNEL_SUPPORT 0x80000000 4549346e6bbSYu-Bo Ryan Wang #define MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING 0x10000000 4557c478bd9Sstevel@tonic-gate 4567c478bd9Sstevel@tonic-gate typedef struct ioc_3_phys_disk { 4577c478bd9Sstevel@tonic-gate uint8_t PhysDiskID; 4587c478bd9Sstevel@tonic-gate uint8_t PhysDiskBus; 4597c478bd9Sstevel@tonic-gate uint8_t PhysDiskIOC; 4607c478bd9Sstevel@tonic-gate uint8_t PhysDiskNum; 4617c478bd9Sstevel@tonic-gate } ioc_3_phys_disk_t; 4627c478bd9Sstevel@tonic-gate 4637c478bd9Sstevel@tonic-gate /* 4647c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 4657c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 4667c478bd9Sstevel@tonic-gate */ 4677c478bd9Sstevel@tonic-gate #ifndef MPI_IOC_PAGE_3_PHYSDISK_MAX 4687c478bd9Sstevel@tonic-gate #define MPI_IOC_PAGE_3_PHYSDISK_MAX 1 4697c478bd9Sstevel@tonic-gate #endif 4707c478bd9Sstevel@tonic-gate 4717c478bd9Sstevel@tonic-gate typedef struct config_page_ioc_3 { 4727c478bd9Sstevel@tonic-gate config_page_header_t Header; 4737c478bd9Sstevel@tonic-gate uint8_t NumPhysDisks; 4747c478bd9Sstevel@tonic-gate uint8_t Reserved1; 4757c478bd9Sstevel@tonic-gate uint16_t Reserved2; 4767c478bd9Sstevel@tonic-gate ioc_3_phys_disk_t PhysDisk[MPI_IOC_PAGE_3_PHYSDISK_MAX]; 4777c478bd9Sstevel@tonic-gate } config_page_ioc_3_t; 4787c478bd9Sstevel@tonic-gate 4797c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE3_PAGEVERSION 0x00 4807c478bd9Sstevel@tonic-gate 4817c478bd9Sstevel@tonic-gate typedef struct ioc_4_sep { 4827c478bd9Sstevel@tonic-gate uint8_t SEPTargetID; 4837c478bd9Sstevel@tonic-gate uint8_t SEPBus; 4847c478bd9Sstevel@tonic-gate uint16_t Reserved; 4857c478bd9Sstevel@tonic-gate } ioc_4_sep_t; 4867c478bd9Sstevel@tonic-gate 4877c478bd9Sstevel@tonic-gate /* 4887c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 4897c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 4907c478bd9Sstevel@tonic-gate */ 4917c478bd9Sstevel@tonic-gate #ifndef MPI_IOC_PAGE_4_SEP_MAX 4927c478bd9Sstevel@tonic-gate #define MPI_IOC_PAGE_4_SEP_MAX 1 4937c478bd9Sstevel@tonic-gate #endif 4947c478bd9Sstevel@tonic-gate 4957c478bd9Sstevel@tonic-gate typedef struct config_page_ioc_4 { 4967c478bd9Sstevel@tonic-gate config_page_header_t Header; 4977c478bd9Sstevel@tonic-gate uint8_t ActiveSEP; 4987c478bd9Sstevel@tonic-gate uint8_t MaxSEP; 4997c478bd9Sstevel@tonic-gate uint16_t Reserved1; 5007c478bd9Sstevel@tonic-gate ioc_4_sep_t SEP[MPI_IOC_PAGE_4_SEP_MAX]; 5017c478bd9Sstevel@tonic-gate } config_page_ioc_4_t; 5027c478bd9Sstevel@tonic-gate 5037c478bd9Sstevel@tonic-gate #define MPI_IOCPAGE4_PAGEVERSION 0x00 5047c478bd9Sstevel@tonic-gate 5057c478bd9Sstevel@tonic-gate /* 5067c478bd9Sstevel@tonic-gate * SCSI Port Config Pages 5077c478bd9Sstevel@tonic-gate */ 5087c478bd9Sstevel@tonic-gate typedef struct config_page_scsi_port_0 { 5097c478bd9Sstevel@tonic-gate config_page_header_t Header; 5107c478bd9Sstevel@tonic-gate uint32_t Capabilities; 5117c478bd9Sstevel@tonic-gate uint32_t PhysicalInterface; 5127c478bd9Sstevel@tonic-gate } config_page_scsi_port_0_t; 5137c478bd9Sstevel@tonic-gate 5147c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_PAGEVERSION 0x01 5157c478bd9Sstevel@tonic-gate 5167c478bd9Sstevel@tonic-gate /* 5177c478bd9Sstevel@tonic-gate * Capabilities 5187c478bd9Sstevel@tonic-gate */ 5197c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_IU 0x00000001 5207c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_DT 0x00000002 5217c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_QAS 0x00000004 5227c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_PACING_TRANSFERS 0x00000008 5237c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_MIN_SYNC_PERIOD_MASK 0x0000FF00 5247c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_MAX_SYNC_OFFSET_MASK 0x00FF0000 5257c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_WIDE 0x20000000 5267c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_CAP_AIP 0x80000000 5277c478bd9Sstevel@tonic-gate 5287c478bd9Sstevel@tonic-gate /* 5297c478bd9Sstevel@tonic-gate * Physical Interface 5307c478bd9Sstevel@tonic-gate */ 5317c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_TYPE_MASK 0x00000003 5327c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_HVD 0x01 5337c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_SE 0x02 5347c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_LVD 0x03 5357c478bd9Sstevel@tonic-gate 5367c478bd9Sstevel@tonic-gate typedef struct config_page_scsi_port_1 { 5377c478bd9Sstevel@tonic-gate config_page_header_t Header; 5387c478bd9Sstevel@tonic-gate uint32_t Configuration; 5397c478bd9Sstevel@tonic-gate uint32_t OnBusTimerValue; 5407c478bd9Sstevel@tonic-gate } config_page_scsi_port_1_t; 5417c478bd9Sstevel@tonic-gate 5427c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE1_PAGEVERSION 0x02 5437c478bd9Sstevel@tonic-gate 5447c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE1_CFG_PORT_SCSI_ID_MASK 0x000000FF 5457c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE1_CFG_PORT_RESPONSE_ID_MASK 0xFFFF0000 5467c478bd9Sstevel@tonic-gate 5477c478bd9Sstevel@tonic-gate typedef struct mpi_device_info { 5487c478bd9Sstevel@tonic-gate uint8_t Timeout; 5497c478bd9Sstevel@tonic-gate uint8_t SyncFactor; 5507c478bd9Sstevel@tonic-gate uint16_t DeviceFlags; 5517c478bd9Sstevel@tonic-gate } mpi_device_info_t; 5527c478bd9Sstevel@tonic-gate 5537c478bd9Sstevel@tonic-gate typedef struct config_page_scsi_port_2 { 5547c478bd9Sstevel@tonic-gate config_page_header_t Header; 5557c478bd9Sstevel@tonic-gate uint32_t PortFlags; 5567c478bd9Sstevel@tonic-gate uint32_t PortSettings; 5577c478bd9Sstevel@tonic-gate mpi_device_info_t DeviceSettings[16]; 5587c478bd9Sstevel@tonic-gate } config_page_scsi_port_2_t; 5597c478bd9Sstevel@tonic-gate 5607c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PAGEVERSION 0x01 5617c478bd9Sstevel@tonic-gate 5627c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_FLAGS_SCAN_HIGH_TO_LOW 0x00000001 5637c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_FLAGS_AVOID_SCSI_RESET 0x00000004 5647c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_FLAGS_ALTERNATE_CHS 0x00000008 5657c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_FLAGS_TERMINATION_DISABLE 0x00000010 5667c478bd9Sstevel@tonic-gate 5677c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_HOST_ID_MASK 0x0000000F 5687c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_MASK_INIT_HBA 0x00000030 5697c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_DISABLE_INIT_HBA 0x00000000 5707c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_BIOS_INIT_HBA 0x00000010 5717c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_OS_INIT_HBA 0x00000020 5727c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_BIOS_OS_INIT_HBA 0x00000030 5737c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_REMOVABLE_MEDIA 0x000000C0 5747c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_SPINUP_DELAY_MASK 0x00000F00 5757c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS 0x00003000 5767c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_NEGO_MASTER_SETTINGS 0x00000000 5777c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_NONE_MASTER_SETTINGS 0x00001000 5787c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS 0x00003000 5797c478bd9Sstevel@tonic-gate 5807c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_DEVICE_DISCONNECT_ENABLE 0x0001 5817c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_DEVICE_ID_SCAN_ENABLE 0x0002 5827c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_DEVICE_LUN_SCAN_ENABLE 0x0004 5837c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_DEVICE_TAG_QUEUE_ENABLE 0x0008 5847c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE 0x0010 5857c478bd9Sstevel@tonic-gate #define MPI_SCSIPORTPAGE2_DEVICE_BOOT_CHOICE 0x0020 5867c478bd9Sstevel@tonic-gate 5877c478bd9Sstevel@tonic-gate /* 5887c478bd9Sstevel@tonic-gate * SCSI Target Device Config Pages 5897c478bd9Sstevel@tonic-gate */ 5907c478bd9Sstevel@tonic-gate typedef struct config_page_scsi_device_0 { 5917c478bd9Sstevel@tonic-gate config_page_header_t Header; 5927c478bd9Sstevel@tonic-gate uint32_t NegotiatedParameters; 5937c478bd9Sstevel@tonic-gate uint32_t Information; 5947c478bd9Sstevel@tonic-gate } config_page_scsi_device_0_t; 5957c478bd9Sstevel@tonic-gate 5967c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_PAGEVERSION 0x02 5977c478bd9Sstevel@tonic-gate 5987c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_IU 0x00000001 5997c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_DT 0x00000002 6007c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_QAS 0x00000004 6017c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK 0x0000FF00 6027c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK 0x00FF0000 6037c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_WIDE 0x20000000 6047c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_AIP 0x80000000 6057c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_NP_IDP 0x08000000 6067c478bd9Sstevel@tonic-gate 6077c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_INFO_PARAMS_NEGOTIATED 0x00000001 6087c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_INFO_SDTR_REJECTED 0x00000002 6097c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_INFO_WDTR_REJECTED 0x00000004 6107c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE0_INFO_PPR_REJECTED 0x00000008 6117c478bd9Sstevel@tonic-gate 6127c478bd9Sstevel@tonic-gate typedef struct config_page_scsi_device_1 { 6137c478bd9Sstevel@tonic-gate config_page_header_t Header; 6147c478bd9Sstevel@tonic-gate uint32_t RequestedParameters; 6157c478bd9Sstevel@tonic-gate uint32_t Reserved; 6167c478bd9Sstevel@tonic-gate uint32_t Configuration; 6177c478bd9Sstevel@tonic-gate } config_page_scsi_device_1_t; 6187c478bd9Sstevel@tonic-gate 6197c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_PAGEVERSION 0x03 6207c478bd9Sstevel@tonic-gate 6217c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_IU 0x00000001 6227c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_DT 0x00000002 6237c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_QAS 0x00000004 6247c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK 0x0000FF00 6257c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK 0x00FF0000 6267c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_WIDE 0x20000000 6277c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_AIP 0x80000000 6287c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_RP_IDP 0x08000000 6297c478bd9Sstevel@tonic-gate 6307c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_DV_LVD_DRIVE_STRENGTH_MASK 0x00000003 6317c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_DV_SE_SLEW_RATE_MASK 0x00000300 6327c478bd9Sstevel@tonic-gate 6337c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED 0x00000002 6347c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED 0x00000004 6357c478bd9Sstevel@tonic-gate 6367c478bd9Sstevel@tonic-gate typedef struct config_page_scsi_device_2 { 6377c478bd9Sstevel@tonic-gate config_page_header_t Header; 6387c478bd9Sstevel@tonic-gate uint32_t DomainValidation; 6397c478bd9Sstevel@tonic-gate uint32_t ParityPipeSelect; 6407c478bd9Sstevel@tonic-gate uint32_t DataPipeSelect; 6417c478bd9Sstevel@tonic-gate } config_page_scsi_device_2_t; 6427c478bd9Sstevel@tonic-gate 6437c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_PAGEVERSION 0x00 6447c478bd9Sstevel@tonic-gate 6457c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_ISI_ENABLE 0x00000010 6467c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_SECONDARY_DRIVER_ENABLE 0x00000020 6477c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_SLEW_RATE_CTRL 0x00000380 6487c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_PRIM_DRIVE_STR_CTRL 0x00001C00 6497c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_SECOND_DRIVE_STR_CTRL 0x0000E000 6507c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_XCLKH_ST 0x10000000 6517c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_XCLKS_ST 0x20000000 6527c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_XCLKH_DT 0x40000000 6537c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DV_XCLKS_DT 0x80000000 6547c478bd9Sstevel@tonic-gate 6557c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_PPS_PPS_MASK 0x00000003 6567c478bd9Sstevel@tonic-gate 6577c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_0_PL_SELECT_MASK 0x00000003 6587c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_1_PL_SELECT_MASK 0x0000000C 6597c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_2_PL_SELECT_MASK 0x00000030 6607c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_3_PL_SELECT_MASK 0x000000C0 6617c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_4_PL_SELECT_MASK 0x00000300 6627c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_5_PL_SELECT_MASK 0x00000C00 6637c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_6_PL_SELECT_MASK 0x00003000 6647c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_7_PL_SELECT_MASK 0x0000C000 6657c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_8_PL_SELECT_MASK 0x00030000 6667c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_9_PL_SELECT_MASK 0x000C0000 6677c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_10_PL_SELECT_MASK 0x00300000 6687c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_11_PL_SELECT_MASK 0x00C00000 6697c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_12_PL_SELECT_MASK 0x03000000 6707c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_13_PL_SELECT_MASK 0x0C000000 6717c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_14_PL_SELECT_MASK 0x30000000 6727c478bd9Sstevel@tonic-gate #define MPI_SCSIDEVPAGE2_DPS_BIT_15_PL_SELECT_MASK 0xC0000000 6737c478bd9Sstevel@tonic-gate 6747c478bd9Sstevel@tonic-gate /* 6757c478bd9Sstevel@tonic-gate * FC Port Config Pages 6767c478bd9Sstevel@tonic-gate */ 6777c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_0 { 6787c478bd9Sstevel@tonic-gate config_page_header_t Header; 6797c478bd9Sstevel@tonic-gate uint32_t Flags; 6807c478bd9Sstevel@tonic-gate uint8_t MPIPortNumber; 6817c478bd9Sstevel@tonic-gate uint8_t Reserved[3]; 6827c478bd9Sstevel@tonic-gate uint32_t PortIdentifier; 6837c478bd9Sstevel@tonic-gate uint64_t WWNN; 6847c478bd9Sstevel@tonic-gate uint64_t WWPN; 6857c478bd9Sstevel@tonic-gate uint32_t SupportedServiceClass; 6867c478bd9Sstevel@tonic-gate uint32_t SupportedSpeeds; 6877c478bd9Sstevel@tonic-gate uint32_t CurrentSpeed; 6887c478bd9Sstevel@tonic-gate uint32_t MaxFrameSize; 6897c478bd9Sstevel@tonic-gate uint64_t FabricWWNN; 6907c478bd9Sstevel@tonic-gate uint64_t FabricWWPN; 6917c478bd9Sstevel@tonic-gate uint32_t DiscoveredPortsCount; 6927c478bd9Sstevel@tonic-gate uint32_t MaxInitiators; 6937c478bd9Sstevel@tonic-gate } config_page_fc_port_0_t; 6947c478bd9Sstevel@tonic-gate 6957c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PAGEVERSION 0x01 6967c478bd9Sstevel@tonic-gate 6977c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_PROT_MASK 0x0000000F 6987c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_INIT \ 6997c478bd9Sstevel@tonic-gate MPI_PORTFACTS_PROTOCOL_INITIATOR 7007c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_TARG \ 7017c478bd9Sstevel@tonic-gate MPI_PORTFACTS_PROTOCOL_TARGET 7027c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_PROT_LAN \ 7037c478bd9Sstevel@tonic-gate MPI_PORTFACTS_PROTOCOL_LAN 7047c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_PROT_LOGBUSADDR \ 7057c478bd9Sstevel@tonic-gate MPI_PORTFACTS_PROTOCOL_LOGBUSADDR 7067c478bd9Sstevel@tonic-gate 7077c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ALIAS_ALPA_SUPPORTED 0x00000010 7087c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ALIAS_WWN_SUPPORTED 0x00000020 7097c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_FABRIC_WWN_VALID 0x00000030 7107c478bd9Sstevel@tonic-gate 7117c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK 0x00000F00 7127c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT 0x00000000 7137c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_POINT_TO_POINT 0x00000100 7147c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PRIVATE_LOOP 0x00000200 7157c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_FABRIC_DIRECT 0x00000400 7167c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PUBLIC_LOOP 0x00000800 7177c478bd9Sstevel@tonic-gate 7187c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK 0x00000F00 7197c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT 0x00000000 7207c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_POINT_TO_POINT 0x00000100 7217c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PRIVATE_LOOP 0x00000200 7227c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_FABRIC_DIRECT 0x00000400 7237c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PUBLIC_LOOP 0x00000800 7247c478bd9Sstevel@tonic-gate 7257c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_RESERVED 0x00 7267c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_OTHER 0x01 7277c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_UNKNOWN 0x02 7287c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_COPPER 0x03 7297c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1300 0x04 7307c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1500 0x05 7317c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_50_LASER_MULTI 0x06 7327c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_50_LED_MULTI 0x07 7337c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_62_LASER_MULTI 0x08 7347c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_62_LED_MULTI 0x09 7357c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_MULTI_LONG_WAVE 0x0A 7367c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_MULTI_SHORT_WAVE 0x0B 7377c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_LASER_SHORT_WAVE 0x0C 7387c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_LED_SHORT_WAVE 0x0D 7397c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_1300_LONG_WAVE 0x0E 7407c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_LTYPE_1500_LONG_WAVE 0x0F 7417c478bd9Sstevel@tonic-gate 7427c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN 0x01 7437c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_ONLINE 0x02 7447c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_OFFLINE 0x03 7457c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_BYPASSED 0x04 7467c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_DIAGNOST 0x05 7477c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_LINKDOWN 0x06 7487c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_ERROR 0x07 7497c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_PORTSTATE_LOOPBACK 0x08 7507c478bd9Sstevel@tonic-gate 7517c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_SUPPORT_CLASS_1 0x00000001 7527c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_SUPPORT_CLASS_2 0x00000002 7537c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_SUPPORT_CLASS_3 0x00000004 7547c478bd9Sstevel@tonic-gate 7557c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED 0x00000001 7567c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED 0x00000002 7577c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED 0x00000004 7587c478bd9Sstevel@tonic-gate 7597c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT \ 7607c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED 7617c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT \ 7627c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED 7637c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE0_CURRENT_SPEED_10GBIT \ 7647c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED 7657c478bd9Sstevel@tonic-gate 7667c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_1 { 7677c478bd9Sstevel@tonic-gate config_page_header_t Header; 7687c478bd9Sstevel@tonic-gate uint32_t Flags; 7697c478bd9Sstevel@tonic-gate uint64_t NoSEEPROMWWNN; 7707c478bd9Sstevel@tonic-gate uint64_t NoSEEPROMWWPN; 7717c478bd9Sstevel@tonic-gate uint8_t HardALPA; 7727c478bd9Sstevel@tonic-gate uint8_t LinkConfig; 7737c478bd9Sstevel@tonic-gate uint8_t TopologyConfig; 7747c478bd9Sstevel@tonic-gate uint8_t Reserved; 7757c478bd9Sstevel@tonic-gate } config_page_fc_port_1_t; 7767c478bd9Sstevel@tonic-gate 7777c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_PAGEVERSION 0x02 7787c478bd9Sstevel@tonic-gate 7797c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_EXT_FCP_STATUS_EN 0x08000000 7807c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_IMMEDIATE_ERROR_REPLY 0x04000000 7817c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_DID 0x00000001 7827c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_WWN 0x00000000 7837c478bd9Sstevel@tonic-gate 7847c478bd9Sstevel@tonic-gate /* 7857c478bd9Sstevel@tonic-gate * Flags used for programming protocol modes in NVStore 7867c478bd9Sstevel@tonic-gate */ 7877c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_PROT_MASK 0xF0000000 7887c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT 28 7897c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT \ 7907c478bd9Sstevel@tonic-gate ((uint32_t)MPI_PORTFACTS_PROTOCOL_INITIATOR << \ 7917c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT) 7927c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_TARG \ 7937c478bd9Sstevel@tonic-gate ((uint32_t)MPI_PORTFACTS_PROTOCOL_TARGET << \ 7947c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT) 7957c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_PROT_LAN \ 7967c478bd9Sstevel@tonic-gate ((uint32_t)MPI_PORTFACTS_PROTOCOL_LAN << \ 7977c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT) 7987c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_FLAGS_PROT_LOGBUSADDR \ 7997c478bd9Sstevel@tonic-gate ((uint32_t)MPI_PORTFACTS_PROTOCOL_LOGBUSADDR << \ 8007c478bd9Sstevel@tonic-gate MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT) 8017c478bd9Sstevel@tonic-gate 8027c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_HARD_ALPA_NOT_USED 0xFF 8037c478bd9Sstevel@tonic-gate 8047c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_LCONFIG_SPEED_MASK 0x0F 8057c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_LCONFIG_SPEED_1GIG 0x00 8067c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_LCONFIG_SPEED_2GIG 0x01 8077c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_LCONFIG_SPEED_4GIG 0x02 8087c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_LCONFIG_SPEED_10GIG 0x03 8097c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_LCONFIG_SPEED_AUTO 0x0F 8107c478bd9Sstevel@tonic-gate 8117c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_TOPOLOGY_MASK 0x0F 8127c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_TOPOLOGY_NLPORT 0x01 8137c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_TOPOLOGY_NPORT 0x02 8147c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE1_TOPOLOGY_AUTO 0x0F 8157c478bd9Sstevel@tonic-gate 8167c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_2 { 8177c478bd9Sstevel@tonic-gate config_page_header_t Header; 8187c478bd9Sstevel@tonic-gate uint8_t NumberActive; 8197c478bd9Sstevel@tonic-gate uint8_t ALPA[127]; 8207c478bd9Sstevel@tonic-gate } config_page_fc_port_2_t; 8217c478bd9Sstevel@tonic-gate 8227c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE2_PAGEVERSION 0x01 8237c478bd9Sstevel@tonic-gate 8247c478bd9Sstevel@tonic-gate typedef struct wwn_format { 8257c478bd9Sstevel@tonic-gate uint64_t WWNN; 8267c478bd9Sstevel@tonic-gate uint64_t WWPN; 8277c478bd9Sstevel@tonic-gate } wwn_format_t; 8287c478bd9Sstevel@tonic-gate 8297c478bd9Sstevel@tonic-gate typedef union fc_port_persistent_physical_id { 8307c478bd9Sstevel@tonic-gate wwn_format_t WWN; 8317c478bd9Sstevel@tonic-gate uint32_t Did; 8327c478bd9Sstevel@tonic-gate } fc_port_persistent_physical_id_t; 8337c478bd9Sstevel@tonic-gate 8347c478bd9Sstevel@tonic-gate typedef struct fc_port_persistent { 8357c478bd9Sstevel@tonic-gate fc_port_persistent_physical_id_t PhysicalIdentifier; 8367c478bd9Sstevel@tonic-gate uint8_t TargetID; 8377c478bd9Sstevel@tonic-gate uint8_t Bus; 8387c478bd9Sstevel@tonic-gate uint16_t Flags; 8397c478bd9Sstevel@tonic-gate } fc_port_persistent_t; 8407c478bd9Sstevel@tonic-gate 8417c478bd9Sstevel@tonic-gate #define MPI_PERSISTENT_FLAGS_SHIFT 16 8427c478bd9Sstevel@tonic-gate #define MPI_PERSISTENT_FLAGS_ENTRY_VALID 0x0001 8437c478bd9Sstevel@tonic-gate #define MPI_PERSISTENT_FLAGS_SCAN_ID 0x0002 8447c478bd9Sstevel@tonic-gate #define MPI_PERSISTENT_FLAGS_SCAN_LUNS 0x0004 8457c478bd9Sstevel@tonic-gate #define MPI_PERSISTENT_FLAGS_BOOT_DEVICE 0x0008 8467c478bd9Sstevel@tonic-gate #define MPI_PERSISTENT_FLAGS_BY_DID 0x0080 8477c478bd9Sstevel@tonic-gate 8487c478bd9Sstevel@tonic-gate /* 8497c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 8507c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 8517c478bd9Sstevel@tonic-gate */ 8527c478bd9Sstevel@tonic-gate #ifndef MPI_FC_PORT_PAGE_3_ENTRY_MAX 8537c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PAGE_3_ENTRY_MAX 1 8547c478bd9Sstevel@tonic-gate #endif 8557c478bd9Sstevel@tonic-gate 8567c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_3 { 8577c478bd9Sstevel@tonic-gate config_page_header_t Header; 8587c478bd9Sstevel@tonic-gate fc_port_persistent_t Entry[MPI_FC_PORT_PAGE_3_ENTRY_MAX]; 8597c478bd9Sstevel@tonic-gate } config_page_fc_port_3_t; 8607c478bd9Sstevel@tonic-gate 8617c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE3_PAGEVERSION 0x01 8627c478bd9Sstevel@tonic-gate 8637c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_4 { 8647c478bd9Sstevel@tonic-gate config_page_header_t Header; 8657c478bd9Sstevel@tonic-gate uint32_t PortFlags; 8667c478bd9Sstevel@tonic-gate uint32_t PortSettings; 8677c478bd9Sstevel@tonic-gate } config_page_fc_port_4_t; 8687c478bd9Sstevel@tonic-gate 8697c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PAGEVERSION 0x00 8707c478bd9Sstevel@tonic-gate 8717c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_FLAGS_ALTERNATE_CHS 0x00000008 8727c478bd9Sstevel@tonic-gate 8737c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_MASK_INIT_HBA 0x00000030 8747c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_DISABLE_INIT_HBA 0x00000000 8757c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_BIOS_INIT_HBA 0x00000010 8767c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_OS_INIT_HBA 0x00000020 8777c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_BIOS_OS_INIT_HBA 0x00000030 8787c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_REMOVABLE_MEDIA 0x000000C0 8797c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE4_PORT_SPINUP_DELAY_MASK 0x00000F00 8807c478bd9Sstevel@tonic-gate 8817c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_5_alias_info { 8827c478bd9Sstevel@tonic-gate uint8_t Flags; 8837c478bd9Sstevel@tonic-gate uint8_t AliasAlpa; 8847c478bd9Sstevel@tonic-gate uint16_t Reserved; 8857c478bd9Sstevel@tonic-gate uint64_t AliasWWNN; 8867c478bd9Sstevel@tonic-gate uint64_t AliasWWPN; 8877c478bd9Sstevel@tonic-gate } config_page_fc_port_5_alias_info_t; 8887c478bd9Sstevel@tonic-gate 8897c478bd9Sstevel@tonic-gate /* 8907c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 8917c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 8927c478bd9Sstevel@tonic-gate */ 8937c478bd9Sstevel@tonic-gate #ifndef MPI_FC_PORT_PAGE_5_ALIAS_MAX 8947c478bd9Sstevel@tonic-gate #define MPI_FC_PORT_PAGE_5_ALIAS_MAX 1 8957c478bd9Sstevel@tonic-gate #endif 8967c478bd9Sstevel@tonic-gate 8977c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_5 { 8987c478bd9Sstevel@tonic-gate config_page_header_t Header; 8997c478bd9Sstevel@tonic-gate config_page_fc_port_5_alias_info_t 9007c478bd9Sstevel@tonic-gate AliasInfo[MPI_FC_PORT_PAGE_5_ALIAS_MAX]; 9017c478bd9Sstevel@tonic-gate } config_page_fc_port_5_t; 9027c478bd9Sstevel@tonic-gate 9037c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE5_PAGEVERSION 0x00 9047c478bd9Sstevel@tonic-gate 9057c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE5_FLAGS_ALIAS_ALPA_VALID 0x01 9067c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE5_FLAGS_ALIAS_WWN_VALID 0x02 9077c478bd9Sstevel@tonic-gate 9087c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_6 { 9097c478bd9Sstevel@tonic-gate config_page_header_t Header; 9107c478bd9Sstevel@tonic-gate uint32_t Reserved; 9117c478bd9Sstevel@tonic-gate uint64_t TimeSinceReset; 9127c478bd9Sstevel@tonic-gate uint64_t TxFrames; 9137c478bd9Sstevel@tonic-gate uint64_t RxFrames; 9147c478bd9Sstevel@tonic-gate uint64_t TxWords; 9157c478bd9Sstevel@tonic-gate uint64_t RxWords; 9167c478bd9Sstevel@tonic-gate uint64_t LipCount; 9177c478bd9Sstevel@tonic-gate uint64_t NosCount; 9187c478bd9Sstevel@tonic-gate uint64_t ErrorFrames; 9197c478bd9Sstevel@tonic-gate uint64_t DumpedFrames; 9207c478bd9Sstevel@tonic-gate uint64_t LinkFailureCount; 9217c478bd9Sstevel@tonic-gate uint64_t LossOfSyncCount; 9227c478bd9Sstevel@tonic-gate uint64_t LossOfSignalCount; 9237c478bd9Sstevel@tonic-gate uint64_t PrimativeSeqErrCount; 9247c478bd9Sstevel@tonic-gate uint64_t InvalidTxWordCount; 9257c478bd9Sstevel@tonic-gate uint64_t InvalidCrcCount; 9267c478bd9Sstevel@tonic-gate uint64_t FcpInitiatorIoCount; 9277c478bd9Sstevel@tonic-gate } config_page_fc_port_6_t; 9287c478bd9Sstevel@tonic-gate 9297c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE6_PAGEVERSION 0x00 9307c478bd9Sstevel@tonic-gate 9317c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_7 { 9327c478bd9Sstevel@tonic-gate config_page_header_t Header; 9337c478bd9Sstevel@tonic-gate uint32_t Reserved; 9347c478bd9Sstevel@tonic-gate uint8_t PortSymbolicName[256]; 9357c478bd9Sstevel@tonic-gate } config_page_fc_port_7_t; 9367c478bd9Sstevel@tonic-gate 9377c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE7_PAGEVERSION 0x00 9387c478bd9Sstevel@tonic-gate 9397c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_8 { 9407c478bd9Sstevel@tonic-gate config_page_header_t Header; 9417c478bd9Sstevel@tonic-gate uint32_t BitVector[8]; 9427c478bd9Sstevel@tonic-gate } config_page_fc_port_8_t; 9437c478bd9Sstevel@tonic-gate 9447c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE8_PAGEVERSION 0x00 9457c478bd9Sstevel@tonic-gate 9467c478bd9Sstevel@tonic-gate typedef struct config_page_fc_port_9 { 9477c478bd9Sstevel@tonic-gate config_page_header_t Header; 9487c478bd9Sstevel@tonic-gate uint32_t Reserved; 9497c478bd9Sstevel@tonic-gate uint64_t GlobalWWPN; 9507c478bd9Sstevel@tonic-gate uint64_t GlobalWWNN; 9517c478bd9Sstevel@tonic-gate uint32_t UnitType; 9527c478bd9Sstevel@tonic-gate uint32_t PhysicalPortNumber; 9537c478bd9Sstevel@tonic-gate uint32_t NumAttachedNodes; 9547c478bd9Sstevel@tonic-gate uint16_t IPVersion; 9557c478bd9Sstevel@tonic-gate uint16_t UDPPortNumber; 9567c478bd9Sstevel@tonic-gate uint8_t IPAddress[16]; 9577c478bd9Sstevel@tonic-gate uint16_t Reserved1; 9587c478bd9Sstevel@tonic-gate uint16_t TopologyDiscoveryFlags; 9597c478bd9Sstevel@tonic-gate } config_page_fc_port_9_t; 9607c478bd9Sstevel@tonic-gate 9617c478bd9Sstevel@tonic-gate #define MPI_FCPORTPAGE9_PAGEVERSION 0x00 9627c478bd9Sstevel@tonic-gate 9637c478bd9Sstevel@tonic-gate /* 9647c478bd9Sstevel@tonic-gate * FC Device Config Pages 9657c478bd9Sstevel@tonic-gate */ 9667c478bd9Sstevel@tonic-gate typedef struct config_page_fc_device_0 { 9677c478bd9Sstevel@tonic-gate config_page_header_t Header; 9687c478bd9Sstevel@tonic-gate uint64_t WWNN; 9697c478bd9Sstevel@tonic-gate uint64_t WWPN; 9707c478bd9Sstevel@tonic-gate uint32_t PortIdentifier; 9717c478bd9Sstevel@tonic-gate uint8_t Protocol; 9727c478bd9Sstevel@tonic-gate uint8_t Flags; 9737c478bd9Sstevel@tonic-gate uint16_t BBCredit; 9747c478bd9Sstevel@tonic-gate uint16_t MaxRxFrameSize; 9757c478bd9Sstevel@tonic-gate uint8_t Reserved1; 9767c478bd9Sstevel@tonic-gate uint8_t PortNumber; 9777c478bd9Sstevel@tonic-gate uint8_t FcPhLowestVersion; 9787c478bd9Sstevel@tonic-gate uint8_t FcPhHighestVersion; 9797c478bd9Sstevel@tonic-gate uint8_t CurrentTargetID; 9807c478bd9Sstevel@tonic-gate uint8_t CurrentBus; 9817c478bd9Sstevel@tonic-gate } config_page_fc_device_0_t; 9827c478bd9Sstevel@tonic-gate 9837c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE_0_PAGEVERSION 0x02 9847c478bd9Sstevel@tonic-gate 9857c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_FLAGS_TARGETID_BUS_VALID 0x01 9867c478bd9Sstevel@tonic-gate 9877c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE_0_PROT_IP 0x01 9887c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE_0_PROT_FCP_TARGET 0x02 9897c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE_0_PROT_FCP_INITIATOR 0x04 9907c478bd9Sstevel@tonic-gate 9917c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_PORT_MASK \ 9927c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_PORT_MASK) 9937c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_MASK \ 9947c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_FORM_MASK) 9957c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_NEXT_DID \ 9967c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_FORM_NEXT_DID) 9977c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_BUS_TID \ 9987c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_FORM_BUS_TID) 9997c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_DID_MASK \ 10007c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_ND_DID_MASK) 10017c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_MASK \ 10027c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_BT_BUS_MASK) 10037c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_SHIFT \ 10047c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT) 10057c478bd9Sstevel@tonic-gate #define MPI_FC_DEVICE_PAGE0_PGAD_TID_MASK \ 10067c478bd9Sstevel@tonic-gate (MPI_FC_DEVICE_PGAD_BT_TID_MASK) 10077c478bd9Sstevel@tonic-gate 10087c478bd9Sstevel@tonic-gate /* 10097c478bd9Sstevel@tonic-gate * RAID Volume Config Pages 10107c478bd9Sstevel@tonic-gate */ 10117c478bd9Sstevel@tonic-gate typedef struct raid_vol0_phys_disk { 10127c478bd9Sstevel@tonic-gate uint16_t Reserved; 10137c478bd9Sstevel@tonic-gate uint8_t PhysDiskMap; 10147c478bd9Sstevel@tonic-gate uint8_t PhysDiskNum; 10157c478bd9Sstevel@tonic-gate } raid_vol0_phys_disk_t; 10167c478bd9Sstevel@tonic-gate 10177c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_PHYSDISK_PRIMARY 0x01 10187c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_PHYSDISK_SECONDARY 0x02 10197c478bd9Sstevel@tonic-gate 10207c478bd9Sstevel@tonic-gate typedef struct raid_vol0_status { 10217c478bd9Sstevel@tonic-gate uint8_t Flags; 10227c478bd9Sstevel@tonic-gate uint8_t State; 10237c478bd9Sstevel@tonic-gate uint16_t Reserved; 10247c478bd9Sstevel@tonic-gate } raid_vol0_status_t; 10257c478bd9Sstevel@tonic-gate 10267c478bd9Sstevel@tonic-gate /* 10277c478bd9Sstevel@tonic-gate * RAID Volume Page 0 VolumeStatus defines 10287c478bd9Sstevel@tonic-gate */ 10297c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_FLAG_ENABLED 0x01 10307c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_FLAG_QUIESCED 0x02 10317c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS 0x04 10327c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE 0x08 10337c478bd9Sstevel@tonic-gate 10347c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_STATE_OPTIMAL 0x00 10357c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_STATE_DEGRADED 0x01 10367c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_STATUS_STATE_FAILED 0x02 10378c80da44Szk194757 #define MPI_RAIDVOL0_STATUS_STATE_MISSING 0x03 10387c478bd9Sstevel@tonic-gate 10397c478bd9Sstevel@tonic-gate typedef struct raid_vol0_settings { 10407c478bd9Sstevel@tonic-gate uint16_t Settings; 10417c478bd9Sstevel@tonic-gate uint8_t HotSparePool; 10427c478bd9Sstevel@tonic-gate uint8_t Reserved; 10437c478bd9Sstevel@tonic-gate } raid_vol0_settings_t; 10447c478bd9Sstevel@tonic-gate 10457c478bd9Sstevel@tonic-gate /* 10467c478bd9Sstevel@tonic-gate * RAID Volume Page 0 VolumeSettings defines 10477c478bd9Sstevel@tonic-gate */ 10487c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_SETTING_WRITE_CACHING_ENABLE 0x0001 10497c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_SETTING_OFFLINE_ON_SMART 0x0002 10507c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_SETTING_AUTO_CONFIGURE 0x0004 10517c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_SETTING_PRIORITY_RESYNC 0x0008 105262020794Sjc156560 #define MPI_RAIDVOL0_SETTING_MASK_METADATA_SIZE 0x00C0 105362020794Sjc156560 #define MPI_RAIDVOL0_SETTING_64MB_METADATA_SIZE 0x0000 105462020794Sjc156560 #define MPI_RAIDVOL0_SETTING_512MB_METADATA_SIZE 0x0040 10557c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_SETTING_USE_PRODUCT_ID_SUFFIX 0x0010 10567c478bd9Sstevel@tonic-gate #define MPI_RAIDVOL0_SETTING_USE_DEFAULTS 0x8000 10577c478bd9Sstevel@tonic-gate 10587c478bd9Sstevel@tonic-gate /* 10597c478bd9Sstevel@tonic-gate * RAID Volume Page 0 HotSparePool defines, also used in RAID Physical Disk 10607c478bd9Sstevel@tonic-gate */ 10617c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_0 0x01 10627c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_1 0x02 10637c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_2 0x04 10647c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_3 0x08 10657c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_4 0x10 10667c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_5 0x20 10677c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_6 0x40 10687c478bd9Sstevel@tonic-gate #define MPI_RAID_HOT_SPARE_POOL_7 0x80 10697c478bd9Sstevel@tonic-gate 10707c478bd9Sstevel@tonic-gate /* 10717c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this 10727c478bd9Sstevel@tonic-gate * define set to one and check Header.PageLength at runtime. 10737c478bd9Sstevel@tonic-gate */ 10747c478bd9Sstevel@tonic-gate #ifndef MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX 10757c478bd9Sstevel@tonic-gate #define MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX 1 10767c478bd9Sstevel@tonic-gate #endif 10777c478bd9Sstevel@tonic-gate 10787c478bd9Sstevel@tonic-gate typedef struct config_page_raid_vol_0 { 10797c478bd9Sstevel@tonic-gate config_page_header_t Header; 10807c478bd9Sstevel@tonic-gate uint8_t VolumeID; 10817c478bd9Sstevel@tonic-gate uint8_t VolumeBus; 10827c478bd9Sstevel@tonic-gate uint8_t VolumeIOC; 10837c478bd9Sstevel@tonic-gate uint8_t VolumeType; 10847c478bd9Sstevel@tonic-gate raid_vol0_status_t VolumeStatus; 10857c478bd9Sstevel@tonic-gate raid_vol0_settings_t VolumeSettings; 10867c478bd9Sstevel@tonic-gate uint32_t MaxLBA; 1087*d65a28a2SYu-Bo Ryan Wang uint32_t MaxLBAHigh; 10887c478bd9Sstevel@tonic-gate uint32_t StripeSize; 10897c478bd9Sstevel@tonic-gate uint32_t Reserved2; 10907c478bd9Sstevel@tonic-gate uint32_t Reserved3; 10917c478bd9Sstevel@tonic-gate uint8_t NumPhysDisks; 10927c478bd9Sstevel@tonic-gate uint8_t Reserved4; 10936fec3791Sjesseb uint8_t ResyncRate; 10946fec3791Sjesseb uint8_t Reserved5; 10957c478bd9Sstevel@tonic-gate raid_vol0_phys_disk_t PhysDisk[MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX]; 10967c478bd9Sstevel@tonic-gate } config_page_raid_vol_0_t; 10977c478bd9Sstevel@tonic-gate 10987c478bd9Sstevel@tonic-gate #define MPI_RAIDVOLPAGE0_PAGEVERSION 0x00 10997c478bd9Sstevel@tonic-gate 110038c67cbdSjiang wu - Sun Microsystems - Beijing China typedef struct config_page_raid_vol_1 110138c67cbdSjiang wu - Sun Microsystems - Beijing China { 110238c67cbdSjiang wu - Sun Microsystems - Beijing China config_page_header_t Header; /* 00h */ 110338c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t VolumeID; /* 04h */ 110438c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t VolumeBus; /* 05h */ 110538c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t VolumeIOC; /* 06h */ 110638c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t Reserved0; /* 07h */ 110738c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t GUID[24]; /* 08h */ 110838c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t Name[32]; /* 20h */ 110938c67cbdSjiang wu - Sun Microsystems - Beijing China uint64_t WWID; /* 40h */ 111038c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t Reserved1; /* 48h */ 111138c67cbdSjiang wu - Sun Microsystems - Beijing China uint8_t Reserved2; /* 4Ch */ 111238c67cbdSjiang wu - Sun Microsystems - Beijing China } config_page_raid_vol_1_t; 111338c67cbdSjiang wu - Sun Microsystems - Beijing China 111438c67cbdSjiang wu - Sun Microsystems - Beijing China #define MPI_RAIDVOLPAGE1_PAGEVERSION 0x01 111538c67cbdSjiang wu - Sun Microsystems - Beijing China 11167c478bd9Sstevel@tonic-gate /* 11177c478bd9Sstevel@tonic-gate * RAID Physical Disk Config Pages 11187c478bd9Sstevel@tonic-gate */ 11197c478bd9Sstevel@tonic-gate typedef struct raid_phys_disk0_error_data { 11207c478bd9Sstevel@tonic-gate uint8_t ErrorCdbByte; 11217c478bd9Sstevel@tonic-gate uint8_t ErrorSenseKey; 11227c478bd9Sstevel@tonic-gate uint16_t Reserved; 11237c478bd9Sstevel@tonic-gate uint16_t ErrorCount; 11247c478bd9Sstevel@tonic-gate uint8_t ErrorASC; 11257c478bd9Sstevel@tonic-gate uint8_t ErrorASCQ; 11267c478bd9Sstevel@tonic-gate uint16_t SmartCount; 11277c478bd9Sstevel@tonic-gate uint8_t SmartASC; 11287c478bd9Sstevel@tonic-gate uint8_t SmartASCQ; 11297c478bd9Sstevel@tonic-gate } raid_phys_disk0_error_data_t; 11307c478bd9Sstevel@tonic-gate 11317c478bd9Sstevel@tonic-gate typedef struct raid_phys_disk_inquiry_data { 11327c478bd9Sstevel@tonic-gate uint8_t VendorID[8]; 11337c478bd9Sstevel@tonic-gate uint8_t ProductID[16]; 11347c478bd9Sstevel@tonic-gate uint8_t ProductRevLevel[4]; 11357c478bd9Sstevel@tonic-gate uint8_t Info[32]; 11367c478bd9Sstevel@tonic-gate } raid_phys_disk0_inquiry_data_t; 11377c478bd9Sstevel@tonic-gate 11387c478bd9Sstevel@tonic-gate typedef struct raid_phys_disk0_settings { 11397c478bd9Sstevel@tonic-gate uint8_t SepID; 11407c478bd9Sstevel@tonic-gate uint8_t SepBus; 11417c478bd9Sstevel@tonic-gate uint8_t HotSparePool; 11427c478bd9Sstevel@tonic-gate uint8_t PhysDiskSettings; 11437c478bd9Sstevel@tonic-gate } raid_phys_disk0_settings_t; 11447c478bd9Sstevel@tonic-gate 11457c478bd9Sstevel@tonic-gate typedef struct raid_phys_disk0_status { 11467c478bd9Sstevel@tonic-gate uint8_t Flags; 11477c478bd9Sstevel@tonic-gate uint8_t State; 11487c478bd9Sstevel@tonic-gate uint16_t Reserved; 11497c478bd9Sstevel@tonic-gate } raid_phys_disk0_status_t; 11507c478bd9Sstevel@tonic-gate 11517c478bd9Sstevel@tonic-gate /* 11527c478bd9Sstevel@tonic-gate * RAID Volume 2 IM Physical Disk DiskStatus flags 11537c478bd9Sstevel@tonic-gate */ 11547c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC 0x01 11557c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_FLAG_QUIESCED 0x02 11567c478bd9Sstevel@tonic-gate 11577c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_ONLINE 0x00 11587c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_MISSING 0x01 11597c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_NOT_COMPATIBLE 0x02 11607c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_FAILED 0x03 11617c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_INITIALIZING 0x04 11627c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED 0x05 11637c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_FAILED_REQUESTED 0x06 11647c478bd9Sstevel@tonic-gate #define MPI_PHYSDISK0_STATUS_OTHER_OFFLINE 0xFF 11657c478bd9Sstevel@tonic-gate 11667c478bd9Sstevel@tonic-gate typedef struct config_page_raid_phys_disk_0 { 11677c478bd9Sstevel@tonic-gate config_page_header_t Header; 11687c478bd9Sstevel@tonic-gate uint8_t PhysDiskID; 11697c478bd9Sstevel@tonic-gate uint8_t PhysDiskBus; 11707c478bd9Sstevel@tonic-gate uint8_t PhysDiskIOC; 11717c478bd9Sstevel@tonic-gate uint8_t PhysDiskNum; 11727c478bd9Sstevel@tonic-gate raid_phys_disk0_settings_t PhysDiskSettings; 11737c478bd9Sstevel@tonic-gate uint32_t Reserved1; 11747c478bd9Sstevel@tonic-gate uint32_t Reserved2; 11757c478bd9Sstevel@tonic-gate uint32_t Reserved3; 11767c478bd9Sstevel@tonic-gate uint8_t DiskIdentifier[16]; 11777c478bd9Sstevel@tonic-gate raid_phys_disk0_inquiry_data_t InquiryData; 11787c478bd9Sstevel@tonic-gate raid_phys_disk0_status_t PhysDiskStatus; 11797c478bd9Sstevel@tonic-gate uint32_t MaxLBA; 11807c478bd9Sstevel@tonic-gate raid_phys_disk0_error_data_t ErrorData; 11817c478bd9Sstevel@tonic-gate } config_page_raid_phys_disk_0_t; 11827c478bd9Sstevel@tonic-gate 11837c478bd9Sstevel@tonic-gate #define MPI_RAIDPHYSDISKPAGE0_PAGEVERSION 0x00 11847c478bd9Sstevel@tonic-gate 118572e1c055Sjc156560 typedef struct raid_phys_disk1_path { 118672e1c055Sjc156560 uint8_t PhysDiskID; 118772e1c055Sjc156560 uint8_t PhysDiskBus; 118872e1c055Sjc156560 uint16_t Reserved1; 118972e1c055Sjc156560 uint64_t WWID; 119072e1c055Sjc156560 uint64_t OwnerWWID; 119172e1c055Sjc156560 uint8_t OwnerIdentifier; 119272e1c055Sjc156560 uint8_t Reserved2; 119372e1c055Sjc156560 uint16_t Flags; 119472e1c055Sjc156560 } raid_phys_disk1_path_t; 119572e1c055Sjc156560 119672e1c055Sjc156560 /* RAID Physical Disk Page 1 Flags field defines */ 119772e1c055Sjc156560 119872e1c055Sjc156560 #define MPI_RAID_PHYSDISK1_FLAG_BROKEN 0x0002 119972e1c055Sjc156560 #define MPI_RAID_PHYSDISK1_FLAG_INVALID 0x0001 120072e1c055Sjc156560 120172e1c055Sjc156560 #ifndef MPI_RAID_PHYS_DISK1_PATH_MAX 120272e1c055Sjc156560 #define MPI_RAID_PHYS_DISK1_PATH_MAX 1 120372e1c055Sjc156560 #endif 120472e1c055Sjc156560 120572e1c055Sjc156560 typedef struct config_page_raid_phys_disk_1 { 120672e1c055Sjc156560 config_page_header_t Header; 120772e1c055Sjc156560 uint8_t NumPhysDiskPaths; 120872e1c055Sjc156560 uint8_t PhysDiskNum; 120972e1c055Sjc156560 uint16_t Reserved2; 121072e1c055Sjc156560 uint32_t Reserved1; 121172e1c055Sjc156560 raid_phys_disk1_path_t Path[MPI_RAID_PHYS_DISK1_PATH_MAX]; 121272e1c055Sjc156560 } config_page_raid_phys_disk_1_t; 121372e1c055Sjc156560 121472e1c055Sjc156560 #define MPI_RAIDPHYSDISKPAGE1_PAGEVERSION 0x01 12157c478bd9Sstevel@tonic-gate /* 12167c478bd9Sstevel@tonic-gate * LAN Config Pages 12177c478bd9Sstevel@tonic-gate */ 12187c478bd9Sstevel@tonic-gate typedef struct config_page_lan_0 { 12197c478bd9Sstevel@tonic-gate config_page_header_t Header; 12207c478bd9Sstevel@tonic-gate uint16_t TxRxModes; 12217c478bd9Sstevel@tonic-gate uint16_t Reserved; 12227c478bd9Sstevel@tonic-gate uint32_t PacketPrePad; 12237c478bd9Sstevel@tonic-gate } config_page_lan_0_t; 12247c478bd9Sstevel@tonic-gate 12257c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE0_PAGEVERSION 0x01 12267c478bd9Sstevel@tonic-gate 12277c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE0_RETURN_LOOPBACK 0x0000 12287c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE0_SUPPRESS_LOOPBACK 0x0001 12297c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE0_LOOPBACK_MASK 0x0001 12307c478bd9Sstevel@tonic-gate 12317c478bd9Sstevel@tonic-gate typedef struct config_page_lan_1 { 12327c478bd9Sstevel@tonic-gate config_page_header_t Header; 12337c478bd9Sstevel@tonic-gate uint16_t Reserved; 12347c478bd9Sstevel@tonic-gate uint8_t CurrentDeviceState; 12357c478bd9Sstevel@tonic-gate uint8_t Reserved1; 12367c478bd9Sstevel@tonic-gate uint32_t MinPacketSize; 12377c478bd9Sstevel@tonic-gate uint32_t MaxPacketSize; 12387c478bd9Sstevel@tonic-gate uint32_t HardwareAddressLow; 12397c478bd9Sstevel@tonic-gate uint32_t HardwareAddressHigh; 12407c478bd9Sstevel@tonic-gate uint32_t MaxWireSpeedLow; 12417c478bd9Sstevel@tonic-gate uint32_t MaxWireSpeedHigh; 12427c478bd9Sstevel@tonic-gate uint32_t BucketsRemaining; 12437c478bd9Sstevel@tonic-gate uint32_t MaxReplySize; 12447c478bd9Sstevel@tonic-gate uint32_t NegWireSpeedLow; 12457c478bd9Sstevel@tonic-gate uint32_t NegWireSpeedHigh; 12467c478bd9Sstevel@tonic-gate } config_page_lan_1_t; 12477c478bd9Sstevel@tonic-gate 12487c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE1_PAGEVERSION 0x03 12497c478bd9Sstevel@tonic-gate 12507c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE1_DEV_STATE_RESET 0x00 12517c478bd9Sstevel@tonic-gate #define MPI_LAN_PAGE1_DEV_STATE_OPERATIONAL 0x01 12527c478bd9Sstevel@tonic-gate 12537c478bd9Sstevel@tonic-gate /* 12547c478bd9Sstevel@tonic-gate * Inband config pages 12557c478bd9Sstevel@tonic-gate */ 12567c478bd9Sstevel@tonic-gate typedef struct config_page_inband_0 { 12577c478bd9Sstevel@tonic-gate config_page_header_t Header; 12587c478bd9Sstevel@tonic-gate mpi_version_format_t InbandVersion; 12597c478bd9Sstevel@tonic-gate uint16_t MaximumBuffers; 12607c478bd9Sstevel@tonic-gate uint16_t Reserved1; 12617c478bd9Sstevel@tonic-gate } config_page_inband_0_t; 12627c478bd9Sstevel@tonic-gate 12637c478bd9Sstevel@tonic-gate /* 12647c478bd9Sstevel@tonic-gate * SAS IO Unit config pages 12657c478bd9Sstevel@tonic-gate */ 12667c478bd9Sstevel@tonic-gate typedef struct mpi_sas_io_unit0_phy_data { 12677c478bd9Sstevel@tonic-gate uint8_t Port; 12687c478bd9Sstevel@tonic-gate uint8_t PortFlags; 12697c478bd9Sstevel@tonic-gate uint8_t PhyFlags; 12707c478bd9Sstevel@tonic-gate uint8_t NegotiatedLinkRate; 12717c478bd9Sstevel@tonic-gate uint32_t ControllerPhyDeviceInfo; 12727c478bd9Sstevel@tonic-gate uint16_t AttachedDeviceHandle; 12737c478bd9Sstevel@tonic-gate uint16_t ControllerDevHandle; 12747c478bd9Sstevel@tonic-gate uint32_t Reserved2; 12757c478bd9Sstevel@tonic-gate } mpi_sas_io_unit0_phy_data_t; 12767c478bd9Sstevel@tonic-gate 12777c478bd9Sstevel@tonic-gate /* 12787c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this define set to 12797c478bd9Sstevel@tonic-gate * one and check Header.PageLength at runtime. 12807c478bd9Sstevel@tonic-gate */ 12817c478bd9Sstevel@tonic-gate #ifndef MPI_SAS_IOUNIT0_PHY_MAX 12827c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PHY_MAX 1 12837c478bd9Sstevel@tonic-gate #endif 12847c478bd9Sstevel@tonic-gate 12857c478bd9Sstevel@tonic-gate typedef struct config_page_sas_io_unit_0 { 12867c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 1287ef287aadSGreg Price uint16_t NvdataVersionDefault; 1288ef287aadSGreg Price uint16_t NvdataVersionPersistent; 12897c478bd9Sstevel@tonic-gate uint8_t NumPhys; 12907c478bd9Sstevel@tonic-gate uint8_t Reserved2; 12917c478bd9Sstevel@tonic-gate uint16_t Reserved3; 12927c478bd9Sstevel@tonic-gate mpi_sas_io_unit0_phy_data_t PhyData[MPI_SAS_IOUNIT0_PHY_MAX]; 12937c478bd9Sstevel@tonic-gate } config_page_sas_io_unit_0_t; 12947c478bd9Sstevel@tonic-gate 12957c478bd9Sstevel@tonic-gate #define MPI_SASIOUNITPAGE0_PAGEVERSION 0x00 12967c478bd9Sstevel@tonic-gate 12977c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS 0x08 12987c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PORT_FLAGS_0_TARGET_IOC_NUM 0x00 12997c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PORT_FLAGS_1_TARGET_IOC_NUM 0x04 13007c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PORT_FLAGS_WAIT_FOR_PORTENABLE 0x02 13017c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PORT_FLAGS_AUTO_PORT_CONFIG 0x01 13027c478bd9Sstevel@tonic-gate 13037c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PHY_FLAGS_PHY_DISABLED 0x04 13047c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PHY_FLAGS_TX_INVERT 0x02 13057c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_PHY_FLAGS_RX_INVERT 0x01 13067c478bd9Sstevel@tonic-gate 13077c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_RATE_UNKNOWN 0x00 13087c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_RATE_PHY_DISABLED 0x01 13097c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION 0x02 13107c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE 0x03 13117c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_RATE_1_5 0x08 13127c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT0_RATE_3_0 0x09 13137c478bd9Sstevel@tonic-gate 13147c478bd9Sstevel@tonic-gate typedef struct mpi_sas_io_unit1_phy_data { 13157c478bd9Sstevel@tonic-gate uint8_t Port; 13167c478bd9Sstevel@tonic-gate uint8_t PortFlags; 13177c478bd9Sstevel@tonic-gate uint8_t PhyFlags; 13187c478bd9Sstevel@tonic-gate uint8_t MaxMinLinkRate; 13197c478bd9Sstevel@tonic-gate uint32_t ControllerPhyDeviceInfo; 13207c478bd9Sstevel@tonic-gate uint32_t Reserved1; 13217c478bd9Sstevel@tonic-gate } mpi_sas_io_unit1_phy_data_t; 13227c478bd9Sstevel@tonic-gate 13237c478bd9Sstevel@tonic-gate /* 13247c478bd9Sstevel@tonic-gate * Host code (drivers, BIOS, utilities, etc.) should leave this define set to 13257c478bd9Sstevel@tonic-gate * one and check Header.PageLength at runtime. 13267c478bd9Sstevel@tonic-gate */ 13277c478bd9Sstevel@tonic-gate #ifndef MPI_SAS_IOUNIT1_PHY_MAX 13287c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PHY_MAX 1 13297c478bd9Sstevel@tonic-gate #endif 13307c478bd9Sstevel@tonic-gate 13317c478bd9Sstevel@tonic-gate typedef struct config_page_sas_io_unit_1 { 13327c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 13337b00d7d8Sdh142964 uint16_t ControlFlags; 13347b00d7d8Sdh142964 uint16_t MaxNumSATATargets; 13357b00d7d8Sdh142964 uint16_t AdditionalControlFlags; 13367b00d7d8Sdh142964 uint16_t Reserved1; 13377c478bd9Sstevel@tonic-gate uint8_t NumPhys; 13387b00d7d8Sdh142964 uint8_t SATAMaxQDepth; 13397b00d7d8Sdh142964 uint8_t ReportMissingDeviceDelay; 13407b00d7d8Sdh142964 uint8_t IODeviceMissingDelay; 13417c478bd9Sstevel@tonic-gate mpi_sas_io_unit1_phy_data_t PhyData[MPI_SAS_IOUNIT1_PHY_MAX]; 13427c478bd9Sstevel@tonic-gate } config_page_sas_io_unit_1_t; 13437c478bd9Sstevel@tonic-gate 13447c478bd9Sstevel@tonic-gate #define MPI_SASIOUNITPAGE1_PAGEVERSION 0x00 13457c478bd9Sstevel@tonic-gate 13467c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PORT_FLAGS_0_TARGET_IOC_NUM 0x00 13477c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PORT_FLAGS_1_TARGET_IOC_NUM 0x04 13487c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PORT_FLAGS_WAIT_FOR_PORTENABLE 0x02 13497c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG 0x01 13507c478bd9Sstevel@tonic-gate 13517c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE 0x04 13527c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PHY_FLAGS_TX_INVERT 0x02 13537c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_PHY_FLAGS_RX_INVERT 0x01 13547c478bd9Sstevel@tonic-gate 13557c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_MAX_RATE_MASK 0xF0 13567c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_MAX_RATE_1_5 0x80 13577c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_MAX_RATE_3_0 0x90 13587c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_MIN_RATE_MASK 0x0F 13597c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_MIN_RATE_1_5 0x08 13607c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT1_MIN_RATE_3_0 0x09 13617c478bd9Sstevel@tonic-gate 13627c478bd9Sstevel@tonic-gate typedef struct config_page_sas_io_unit_2 { 13637c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 13647c478bd9Sstevel@tonic-gate uint32_t Reserved1; 13657c478bd9Sstevel@tonic-gate uint16_t MaxPersistentIDs; 13667c478bd9Sstevel@tonic-gate uint16_t NumPersistentIDsUsed; 13677c478bd9Sstevel@tonic-gate uint8_t Status; 13687c478bd9Sstevel@tonic-gate uint8_t Flags; 13697c478bd9Sstevel@tonic-gate uint16_t Reserved2; 13707c478bd9Sstevel@tonic-gate } config_page_sas_io_unit_2_t; 13717c478bd9Sstevel@tonic-gate 13727c478bd9Sstevel@tonic-gate #define MPI_SASIOUNITPAGE2_PAGEVERSION 0x00 13737c478bd9Sstevel@tonic-gate 13747c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT2_STATUS_DISABLED_PERSISTENT_MAPPINGS 0x02 13757c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT2_STATUS_FULL_PERSISTENT_MAPPINGS 0x01 13767c478bd9Sstevel@tonic-gate 13777c478bd9Sstevel@tonic-gate #define MPI_SAS_IOUNIT2_FLAGS_DISABLE_PERSISTENT_MAPPINGS 0x01 13787c478bd9Sstevel@tonic-gate 137972e1c055Sjc156560 #define MPI_SAS_IOUNIT2_FLAGS_MASK_PHYS_MAP_MODE 0x0E 138072e1c055Sjc156560 #define MPI_SAS_IOUNIT2_FLAGS_SHIFT_PHYS_MAP_MODE 1 138172e1c055Sjc156560 #define MPI_SAS_IOUNIT2_FLAGS_NO_PHYS_MAP 0x00 138272e1c055Sjc156560 #define MPI_SAS_IOUNIT2_FLAGS_DIRECT_ATTACH_PHYS_MAP 0x01 138372e1c055Sjc156560 #define MPI_SAS_IOUNIT2_FLAGS_ENCLOSURE_SLOT_PHYS_MAP 0x02 138472e1c055Sjc156560 #define MPI_SAS_IOUNIT2_FLAGS_HOST_ASSIGNED_PHYS_MAP 0x07 13857c478bd9Sstevel@tonic-gate 13867c478bd9Sstevel@tonic-gate typedef struct config_page_sas_io_unit_3 { 13877c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 13887c478bd9Sstevel@tonic-gate uint32_t Reserved1; 13897c478bd9Sstevel@tonic-gate uint32_t MaxInvalidDwordCount; 13907c478bd9Sstevel@tonic-gate uint32_t InvalidDwordCountTime; 13917c478bd9Sstevel@tonic-gate uint32_t MaxRunningDisparityErrorCount; 13927c478bd9Sstevel@tonic-gate uint32_t RunningDisparityErrorTime; 13937c478bd9Sstevel@tonic-gate uint32_t MaxLossDwordSynchCount; 13947c478bd9Sstevel@tonic-gate uint32_t LossDwordSynchCountTime; 13957c478bd9Sstevel@tonic-gate uint32_t MaxPhyResetProblemCount; 13967c478bd9Sstevel@tonic-gate uint32_t PhyResetProblemTime; 13977c478bd9Sstevel@tonic-gate } config_page_sas_io_unit_3_t; 13987c478bd9Sstevel@tonic-gate 13997c478bd9Sstevel@tonic-gate #define MPI_SASIOUNITPAGE3_PAGEVERSION 0x00 14007c478bd9Sstevel@tonic-gate 14017c478bd9Sstevel@tonic-gate typedef struct config_page_sas_expander_0 { 14027c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 1403936b7af6Sjw149990 uint8_t PhysicalPort; 1404936b7af6Sjw149990 uint8_t Reserved1; 1405936b7af6Sjw149990 uint16_t EnclosureHandle; 14067c478bd9Sstevel@tonic-gate uint64_t SASAddress; 14077c478bd9Sstevel@tonic-gate uint32_t Reserved2; 14087c478bd9Sstevel@tonic-gate uint16_t DevHandle; 14097c478bd9Sstevel@tonic-gate uint16_t ParentDevHandle; 14107c478bd9Sstevel@tonic-gate uint16_t ExpanderChangeCount; 14117c478bd9Sstevel@tonic-gate uint16_t ExpanderRouteIndexes; 14127c478bd9Sstevel@tonic-gate uint8_t NumPhys; 14137c478bd9Sstevel@tonic-gate uint8_t SASLevel; 14147c478bd9Sstevel@tonic-gate uint8_t Flags; 14157c478bd9Sstevel@tonic-gate uint8_t Reserved3; 14167c478bd9Sstevel@tonic-gate } config_page_sas_expander_0_t; 14177c478bd9Sstevel@tonic-gate 14187c478bd9Sstevel@tonic-gate #define MPI_SASEXPANDER0_PAGEVERSION 0x00 14197c478bd9Sstevel@tonic-gate 14207c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG 0x02 14217c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS 0x01 14227c478bd9Sstevel@tonic-gate 14237c478bd9Sstevel@tonic-gate 14247c478bd9Sstevel@tonic-gate typedef struct config_page_sas_expander_1 { 14257c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 14267c478bd9Sstevel@tonic-gate uint32_t Reserved1; 14277c478bd9Sstevel@tonic-gate uint8_t NumPhys; 14287c478bd9Sstevel@tonic-gate uint8_t Phy; 14297c478bd9Sstevel@tonic-gate uint16_t Reserved2; 14307c478bd9Sstevel@tonic-gate uint8_t ProgrammedLinkRate; 14317c478bd9Sstevel@tonic-gate uint8_t HwLinkRate; 14327c478bd9Sstevel@tonic-gate uint16_t AttachedDevHandle; 14337c478bd9Sstevel@tonic-gate uint32_t PhyInfo; 14347c478bd9Sstevel@tonic-gate uint32_t AttachedDeviceInfo; 14357c478bd9Sstevel@tonic-gate uint16_t OwnerDevHandle; 14367c478bd9Sstevel@tonic-gate uint8_t ChangeCount; 14377c478bd9Sstevel@tonic-gate uint8_t Reserved3; 14387c478bd9Sstevel@tonic-gate uint8_t PhyIdentifier; 14397c478bd9Sstevel@tonic-gate uint8_t AttachedPhyIdentifier; 14407c478bd9Sstevel@tonic-gate uint8_t NumTableEntriesProg; 14417c478bd9Sstevel@tonic-gate uint8_t DiscoveryInfo; 14427c478bd9Sstevel@tonic-gate uint32_t Reserved4; 14437c478bd9Sstevel@tonic-gate } config_page_sas_expander_1_t; 14447c478bd9Sstevel@tonic-gate 14457c478bd9Sstevel@tonic-gate #define MPI_SASEXPANDER1_PAGEVERSION 0x00 14467c478bd9Sstevel@tonic-gate 14477c478bd9Sstevel@tonic-gate /* use MPI_SAS_PHY0_PRATE_ defines for ProgrammedLinkRate */ 14487c478bd9Sstevel@tonic-gate 14497c478bd9Sstevel@tonic-gate /* use MPI_SAS_PHY0_HWRATE_ defines for HwLinkRate */ 14507c478bd9Sstevel@tonic-gate 14517c478bd9Sstevel@tonic-gate /* use MPI_SAS_PHY0_PHYINFO_ defines for PhyInfo */ 14527c478bd9Sstevel@tonic-gate 14537c478bd9Sstevel@tonic-gate /* see mpi_sas.h for values for SAS Expander Page 1 AttachedDeviceInfo values */ 14547c478bd9Sstevel@tonic-gate 14557c478bd9Sstevel@tonic-gate /* values for SAS Expander Page 1 DiscoveryInfo field */ 14567c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE 0x02 14577c478bd9Sstevel@tonic-gate #define MPI_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES 0x01 14587c478bd9Sstevel@tonic-gate 14597c478bd9Sstevel@tonic-gate typedef struct config_page_sas_device_0 { 14607c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 14616fec3791Sjesseb uint16_t Slot; 14626fec3791Sjesseb uint16_t EnclosureHandle; 14637c478bd9Sstevel@tonic-gate uint64_t SASAddress; 14646fec3791Sjesseb uint16_t ParentDevHandle; 14656fec3791Sjesseb uint8_t PhyNum; 14666fec3791Sjesseb uint8_t AccessStatus; 14677c478bd9Sstevel@tonic-gate uint16_t DevHandle; 14687c478bd9Sstevel@tonic-gate uint8_t TargetID; 14697c478bd9Sstevel@tonic-gate uint8_t Bus; 14707c478bd9Sstevel@tonic-gate uint32_t DeviceInfo; 14717c478bd9Sstevel@tonic-gate uint16_t Flags; 14727c478bd9Sstevel@tonic-gate uint8_t PhysicalPort; 14736fec3791Sjesseb uint8_t Reserved2; 14747c478bd9Sstevel@tonic-gate } config_page_sas_device_0_t; 14757c478bd9Sstevel@tonic-gate 14767c478bd9Sstevel@tonic-gate #define MPI_SASDEVICE0_PAGEVERSION 0x00 14777c478bd9Sstevel@tonic-gate 14787c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE0_FLAGS_MAPPING_PERSISTENT 0x04 14797c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED 0x02 14807c478bd9Sstevel@tonic-gate #define MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT 0x01 14817c478bd9Sstevel@tonic-gate 14827c478bd9Sstevel@tonic-gate typedef struct config_page_sas_device_1 { 14837c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 14847c478bd9Sstevel@tonic-gate uint32_t Reserved1; 14857c478bd9Sstevel@tonic-gate uint64_t SASAddress; 14867c478bd9Sstevel@tonic-gate uint32_t Reserved2; 14877c478bd9Sstevel@tonic-gate uint16_t DevHandle; 14887c478bd9Sstevel@tonic-gate uint8_t TargetID; 14897c478bd9Sstevel@tonic-gate uint8_t Bus; 14907c478bd9Sstevel@tonic-gate uint8_t InitialRegDeviceFIS[20]; 14917c478bd9Sstevel@tonic-gate } config_page_sas_device_1_t; 14927c478bd9Sstevel@tonic-gate 14937c478bd9Sstevel@tonic-gate #define MPI_SASDEVICE1_PAGEVERSION 0x00 14947c478bd9Sstevel@tonic-gate 14957c478bd9Sstevel@tonic-gate typedef struct config_page_sas_phy_0 { 14967c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 14977c478bd9Sstevel@tonic-gate uint32_t Reserved1; 14987c478bd9Sstevel@tonic-gate uint64_t SASAddress; 14997c478bd9Sstevel@tonic-gate uint16_t AttachedDevHandle; 15007c478bd9Sstevel@tonic-gate uint8_t AttachedPhyIdentifier; 15017c478bd9Sstevel@tonic-gate uint8_t Reserved2; 15027c478bd9Sstevel@tonic-gate uint32_t AttachedDeviceInfo; 15037c478bd9Sstevel@tonic-gate uint8_t ProgrammedLinkRate; 15047c478bd9Sstevel@tonic-gate uint8_t HwLinkRate; 15057c478bd9Sstevel@tonic-gate uint8_t ChangeCount; 15067c478bd9Sstevel@tonic-gate uint8_t Reserved3; 15077c478bd9Sstevel@tonic-gate uint32_t PhyInfo; 15087c478bd9Sstevel@tonic-gate } config_page_sas_phy_0_t; 15097c478bd9Sstevel@tonic-gate 15107c478bd9Sstevel@tonic-gate #define MPI_SASPHY0_PAGEVERSION 0x00 15117c478bd9Sstevel@tonic-gate 15127c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MAX_RATE_MASK 0xF0 15137c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MAX_RATE_NOT_PROGRAMMABLE 0x00 15147c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MAX_RATE_1_5 0x80 15157c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MAX_RATE_3_0 0x90 15167c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MIN_RATE_MASK 0x0F 15177c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MIN_RATE_NOT_PROGRAMMABLE 0x00 15187c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MIN_RATE_1_5 0x08 15197c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PRATE_MIN_RATE_3_0 0x09 15207c478bd9Sstevel@tonic-gate 15217c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_HWRATE_MAX_RATE_MASK 0xF0 15227c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5 0x80 15237c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_HWRATE_MAX_RATE_3_0 0x90 15247c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK 0x0F 15257c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5 0x08 15267c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_HWRATE_MIN_RATE_3_0 0x09 15277c478bd9Sstevel@tonic-gate 15287c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_ACTIVE 0x00004000 15297c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_SELECTOR 0x00002000 15307c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_VIRTUAL_PHY 0x00001000 15317c478bd9Sstevel@tonic-gate 15327c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_MASK_PARTIAL_PATHWAY_TIME 0x00000F00 15337c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_SHIFT_PARTIAL_PATHWAY_TIME 8 15347c478bd9Sstevel@tonic-gate 15357c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_MASK_ROUTING_ATTRIBUTE 0x000000F0 15367c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_DIRECT_ROUTING 0x00000000 15377c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_SUBTRACTIVE_ROUTING 0x00000010 15387c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_TABLE_ROUTING 0x00000020 15397c478bd9Sstevel@tonic-gate 15407c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_DEVINFO_SATA_DEVICE 0x00000080 15417c478bd9Sstevel@tonic-gate 15427c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_MASK_LINK_RATE 0x0000000F 15437c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_UNKNOWN_LINK_RATE 0x00000000 15447c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_PHY_DISABLED 0x00000001 15457c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_NEGOTIATION_FAILED 0x00000002 15467c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_SATA_OOB_COMPLETE 0x00000003 15477c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_RATE_1_5 0x00000008 15487c478bd9Sstevel@tonic-gate #define MPI_SAS_PHY0_PHYINFO_RATE_3_0 0x00000009 15497c478bd9Sstevel@tonic-gate 15507c478bd9Sstevel@tonic-gate typedef struct config_page_sas_phy_1 { 15517c478bd9Sstevel@tonic-gate config_extended_page_header_t Header; 15527c478bd9Sstevel@tonic-gate uint32_t Reserved1; 15537c478bd9Sstevel@tonic-gate uint32_t InvalidDwordCount; 15547c478bd9Sstevel@tonic-gate uint32_t RunningDisparityErrorCount; 15557c478bd9Sstevel@tonic-gate uint32_t LossDwordSynchCount; 15567c478bd9Sstevel@tonic-gate uint32_t PhyResetProblemCount; 15577c478bd9Sstevel@tonic-gate } config_page_sas_phy_1_t; 15587c478bd9Sstevel@tonic-gate 15597c478bd9Sstevel@tonic-gate #define MPI_SASPHY1_PAGEVERSION 0x00 15607c478bd9Sstevel@tonic-gate 15617c478bd9Sstevel@tonic-gate #ifdef __cplusplus 15627c478bd9Sstevel@tonic-gate } 15637c478bd9Sstevel@tonic-gate #endif 15647c478bd9Sstevel@tonic-gate 15657c478bd9Sstevel@tonic-gate #endif /* _SYS_MPI_CNFG_H */ 1566