mpi_cnfg.h 157 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117
  1. /*
  2. * Copyright (c) 2000-2008 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi_cnfg.h
  6. * Title: MPI Config message, structures, and Pages
  7. * Creation Date: July 27, 2000
  8. *
  9. * mpi_cnfg.h Version: 01.05.18
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
  17. * 06-06-00 01.00.01 Update version number for 1.0 release.
  18. * 06-08-00 01.00.02 Added _PAGEVERSION definitions for all pages.
  19. * Added FcPhLowestVersion, FcPhHighestVersion, Reserved2
  20. * fields to FC_DEVICE_0 page, updated the page version.
  21. * Changed _FREE_RUNNING_CLOCK to _PACING_TRANSFERS in
  22. * SCSI_PORT_0, SCSI_DEVICE_0 and SCSI_DEVICE_1 pages
  23. * and updated the page versions.
  24. * Added _RESPONSE_ID_MASK definition to SCSI_PORT_1
  25. * page and updated the page version.
  26. * Added Information field and _INFO_PARAMS_NEGOTIATED
  27. * definitionto SCSI_DEVICE_0 page.
  28. * 06-22-00 01.00.03 Removed batch controls from LAN_0 page and updated the
  29. * page version.
  30. * Added BucketsRemaining to LAN_1 page, redefined the
  31. * state values, and updated the page version.
  32. * Revised bus width definitions in SCSI_PORT_0,
  33. * SCSI_DEVICE_0 and SCSI_DEVICE_1 pages.
  34. * 06-30-00 01.00.04 Added MaxReplySize to LAN_1 page and updated the page
  35. * version.
  36. * Moved FC_DEVICE_0 PageAddress description to spec.
  37. * 07-27-00 01.00.05 Corrected the SubsystemVendorID and SubsystemID field
  38. * widths in IOC_0 page and updated the page version.
  39. * 11-02-00 01.01.01 Original release for post 1.0 work
  40. * Added Manufacturing pages, IO Unit Page 2, SCSI SPI
  41. * Port Page 2, FC Port Page 4, FC Port Page 5
  42. * 11-15-00 01.01.02 Interim changes to match proposals
  43. * 12-04-00 01.01.03 Config page changes to match MPI rev 1.00.01.
  44. * 12-05-00 01.01.04 Modified config page actions.
  45. * 01-09-01 01.01.05 Added defines for page address formats.
  46. * Data size for Manufacturing pages 2 and 3 no longer
  47. * defined here.
  48. * Io Unit Page 2 size is fixed at 4 adapters and some
  49. * flags were changed.
  50. * SCSI Port Page 2 Device Settings modified.
  51. * New fields added to FC Port Page 0 and some flags
  52. * cleaned up.
  53. * Removed impedance flash from FC Port Page 1.
  54. * Added FC Port pages 6 and 7.
  55. * 01-25-01 01.01.06 Added MaxInitiators field to FcPortPage0.
  56. * 01-29-01 01.01.07 Changed some defines to make them 32 character unique.
  57. * Added some LinkType defines for FcPortPage0.
  58. * 02-20-01 01.01.08 Started using MPI_POINTER.
  59. * 02-27-01 01.01.09 Replaced MPI_CONFIG_PAGETYPE_SCSI_LUN with
  60. * MPI_CONFIG_PAGETYPE_RAID_VOLUME.
  61. * Added definitions and structures for IOC Page 2 and
  62. * RAID Volume Page 2.
  63. * 03-27-01 01.01.10 Added CONFIG_PAGE_FC_PORT_8 and CONFIG_PAGE_FC_PORT_9.
  64. * CONFIG_PAGE_FC_PORT_3 now supports persistent by DID.
  65. * Added VendorId and ProductRevLevel fields to
  66. * RAIDVOL2_IM_PHYS_ID struct.
  67. * Modified values for MPI_FCPORTPAGE0_FLAGS_ATTACH_
  68. * defines to make them compatible to MPI version 1.0.
  69. * Added structure offset comments.
  70. * 04-09-01 01.01.11 Added some new defines for the PageAddress field and
  71. * removed some obsolete ones.
  72. * Added IO Unit Page 3.
  73. * Modified defines for Scsi Port Page 2.
  74. * Modified RAID Volume Pages.
  75. * 08-08-01 01.02.01 Original release for v1.2 work.
  76. * Added SepID and SepBus to RVP2 IMPhysicalDisk struct.
  77. * Added defines for the SEP bits in RVP2 VolumeSettings.
  78. * Modified the DeviceSettings field in RVP2 to use the
  79. * proper structure.
  80. * Added defines for SES, SAF-TE, and cross channel for
  81. * IOCPage2 CapabilitiesFlags.
  82. * Removed define for MPI_IOUNITPAGE2_FLAGS_RAID_DISABLE.
  83. * Removed define for
  84. * MPI_SCSIPORTPAGE2_PORT_FLAGS_PARITY_ENABLE.
  85. * Added define for MPI_CONFIG_PAGEATTR_RO_PERSISTENT.
  86. * 08-29-01 01.02.02 Fixed value for MPI_MANUFACTPAGE_DEVID_53C1035.
  87. * Added defines for MPI_FCPORTPAGE1_FLAGS_HARD_ALPA_ONLY
  88. * and MPI_FCPORTPAGE1_FLAGS_IMMEDIATE_ERROR_REPLY.
  89. * Removed MPI_SCSIPORTPAGE0_CAP_PACING_TRANSFERS,
  90. * MPI_SCSIDEVPAGE0_NP_PACING_TRANSFERS, and
  91. * MPI_SCSIDEVPAGE1_RP_PACING_TRANSFERS, and
  92. * MPI_SCSIDEVPAGE1_CONF_PPR_ALLOWED.
  93. * Added defines for MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED
  94. * and MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED.
  95. * Added OnBusTimerValue to CONFIG_PAGE_SCSI_PORT_1.
  96. * Added rejected bits to SCSI Device Page 0 Information.
  97. * Increased size of ALPA array in FC Port Page 2 by one
  98. * and removed a one byte reserved field.
  99. * 09-28-01 01.02.03 Swapped NegWireSpeedLow and NegWireSpeedLow in
  100. * CONFIG_PAGE_LAN_1 to match preferred 64-bit ordering.
  101. * Added structures for Manufacturing Page 4, IO Unit
  102. * Page 3, IOC Page 3, IOC Page 4, RAID Volume Page 0, and
  103. * RAID PhysDisk Page 0.
  104. * 10-04-01 01.02.04 Added define for MPI_CONFIG_PAGETYPE_RAID_PHYSDISK.
  105. * Modified some of the new defines to make them 32
  106. * character unique.
  107. * Modified how variable length pages (arrays) are defined.
  108. * Added generic defines for hot spare pools and RAID
  109. * volume types.
  110. * 11-01-01 01.02.05 Added define for MPI_IOUNITPAGE1_DISABLE_IR.
  111. * 03-14-02 01.02.06 Added PCISlotNum field to CONFIG_PAGE_IOC_1 along with
  112. * related define, and bumped the page version define.
  113. * 05-31-02 01.02.07 Added a Flags field to CONFIG_PAGE_IOC_2_RAID_VOL in a
  114. * reserved byte and added a define.
  115. * Added define for
  116. * MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE.
  117. * Added new config page: CONFIG_PAGE_IOC_5.
  118. * Added MaxAliases, MaxHardAliases, and NumCurrentAliases
  119. * fields to CONFIG_PAGE_FC_PORT_0.
  120. * Added AltConnector and NumRequestedAliases fields to
  121. * CONFIG_PAGE_FC_PORT_1.
  122. * Added new config page: CONFIG_PAGE_FC_PORT_10.
  123. * 07-12-02 01.02.08 Added more MPI_MANUFACTPAGE_DEVID_ defines.
  124. * Added additional MPI_SCSIDEVPAGE0_NP_ defines.
  125. * Added more MPI_SCSIDEVPAGE1_RP_ defines.
  126. * Added define for
  127. * MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE.
  128. * Added new config page: CONFIG_PAGE_SCSI_DEVICE_3.
  129. * Modified MPI_FCPORTPAGE5_FLAGS_ defines.
  130. * 09-16-02 01.02.09 Added MPI_SCSIDEVPAGE1_CONF_FORCE_PPR_MSG define.
  131. * 11-15-02 01.02.10 Added ConnectedID defines for CONFIG_PAGE_SCSI_PORT_0.
  132. * Added more Flags defines for CONFIG_PAGE_FC_PORT_1.
  133. * Added more Flags defines for CONFIG_PAGE_FC_DEVICE_0.
  134. * 04-01-03 01.02.11 Added RR_TOV field and additional Flags defines for
  135. * CONFIG_PAGE_FC_PORT_1.
  136. * Added define MPI_FCPORTPAGE5_FLAGS_DISABLE to disable
  137. * an alias.
  138. * Added more device id defines.
  139. * 06-26-03 01.02.12 Added MPI_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID define.
  140. * Added TargetConfig and IDConfig fields to
  141. * CONFIG_PAGE_SCSI_PORT_1.
  142. * Added more PortFlags defines for CONFIG_PAGE_SCSI_PORT_2
  143. * to control DV.
  144. * Added more Flags defines for CONFIG_PAGE_FC_PORT_1.
  145. * In CONFIG_PAGE_FC_DEVICE_0, replaced Reserved1 field
  146. * with ADISCHardALPA.
  147. * Added MPI_FC_DEVICE_PAGE0_PROT_FCP_RETRY define.
  148. * 01-16-04 01.02.13 Added InitiatorDeviceTimeout and InitiatorIoPendTimeout
  149. * fields and related defines to CONFIG_PAGE_FC_PORT_1.
  150. * Added define for
  151. * MPI_FCPORTPAGE1_FLAGS_SOFT_ALPA_FALLBACK.
  152. * Added new fields to the substructures of
  153. * CONFIG_PAGE_FC_PORT_10.
  154. * 04-29-04 01.02.14 Added define for IDP bit for CONFIG_PAGE_SCSI_PORT_0,
  155. * CONFIG_PAGE_SCSI_DEVICE_0, and
  156. * CONFIG_PAGE_SCSI_DEVICE_1. Also bumped Page Version for
  157. * these pages.
  158. * 05-11-04 01.03.01 Added structure for CONFIG_PAGE_INBAND_0.
  159. * 08-19-04 01.05.01 Modified MSG_CONFIG request to support extended config
  160. * pages.
  161. * Added a new structure for extended config page header.
  162. * Added new extended config pages types and structures for
  163. * SAS IO Unit, SAS Expander, SAS Device, and SAS PHY.
  164. * Replaced a reserved byte in CONFIG_PAGE_MANUFACTURING_4
  165. * to add a Flags field.
  166. * Two new Manufacturing config pages (5 and 6).
  167. * Two new bits defined for IO Unit Page 1 Flags field.
  168. * Modified CONFIG_PAGE_IO_UNIT_2 to add three new fields
  169. * to specify the BIOS boot device.
  170. * Four new Flags bits defined for IO Unit Page 2.
  171. * Added IO Unit Page 4.
  172. * Added EEDP Flags settings to IOC Page 1.
  173. * Added new BIOS Page 1 config page.
  174. * 10-05-04 01.05.02 Added define for
  175. * MPI_IOCPAGE1_INITIATOR_CONTEXT_REPLY_DISABLE.
  176. * Added new Flags field to CONFIG_PAGE_MANUFACTURING_5 and
  177. * associated defines.
  178. * Added more defines for SAS IO Unit Page 0
  179. * DiscoveryStatus field.
  180. * Added define for MPI_SAS_IOUNIT0_DS_SUBTRACTIVE_LINK
  181. * and MPI_SAS_IOUNIT0_DS_TABLE_LINK.
  182. * Added defines for Physical Mapping Modes to SAS IO Unit
  183. * Page 2.
  184. * Added define for
  185. * MPI_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH.
  186. * 10-27-04 01.05.03 Added defines for new SAS PHY page addressing mode.
  187. * Added defines for MaxTargetSpinUp to BIOS Page 1.
  188. * Added 5 new ControlFlags defines for SAS IO Unit
  189. * Page 1.
  190. * Added MaxNumPhysicalMappedIDs field to SAS IO Unit
  191. * Page 2.
  192. * Added AccessStatus field to SAS Device Page 0 and added
  193. * new Flags bits for supported SATA features.
  194. * 12-07-04 01.05.04 Added config page structures for BIOS Page 2, RAID
  195. * Volume Page 1, and RAID Physical Disk Page 1.
  196. * Replaced IO Unit Page 1 BootTargetID,BootBus, and
  197. * BootAdapterNum with reserved field.
  198. * Added DataScrubRate and ResyncRate to RAID Volume
  199. * Page 0.
  200. * Added MPI_SAS_IOUNIT2_FLAGS_RESERVE_ID_0_FOR_BOOT
  201. * define.
  202. * 12-09-04 01.05.05 Added Target Mode Large CDB Enable to FC Port Page 1
  203. * Flags field.
  204. * Added Auto Port Config flag define for SAS IOUNIT
  205. * Page 1 ControlFlags.
  206. * Added Disabled bad Phy define to Expander Page 1
  207. * Discovery Info field.
  208. * Added SAS/SATA device support to SAS IOUnit Page 1
  209. * ControlFlags.
  210. * Added Unsupported device to SAS Dev Page 0 Flags field
  211. * Added disable use SATA Hash Address for SAS IOUNIT
  212. * page 1 in ControlFields.
  213. * 01-15-05 01.05.06 Added defaults for data scrub rate and resync rate to
  214. * Manufacturing Page 4.
  215. * Added new defines for BIOS Page 1 IOCSettings field.
  216. * Added ExtDiskIdentifier field to RAID Physical Disk
  217. * Page 0.
  218. * Added new defines for SAS IO Unit Page 1 ControlFlags
  219. * and to SAS Device Page 0 Flags to control SATA devices.
  220. * Added defines and structures for the new Log Page 0, a
  221. * new type of configuration page.
  222. * 02-09-05 01.05.07 Added InactiveStatus field to RAID Volume Page 0.
  223. * Added WWID field to RAID Volume Page 1.
  224. * Added PhysicalPort field to SAS Expander pages 0 and 1.
  225. * 03-11-05 01.05.08 Removed the EEDP flags from IOC Page 1.
  226. * Added Enclosure/Slot boot device format to BIOS Page 2.
  227. * New status value for RAID Volume Page 0 VolumeStatus
  228. * (VolumeState subfield).
  229. * New value for RAID Physical Page 0 InactiveStatus.
  230. * Added Inactive Volume Member flag RAID Physical Disk
  231. * Page 0 PhysDiskStatus field.
  232. * New physical mapping mode in SAS IO Unit Page 2.
  233. * Added CONFIG_PAGE_SAS_ENCLOSURE_0.
  234. * Added Slot and Enclosure fields to SAS Device Page 0.
  235. * 06-24-05 01.05.09 Added EEDP defines to IOC Page 1.
  236. * Added more RAID type defines to IOC Page 2.
  237. * Added Port Enable Delay settings to BIOS Page 1.
  238. * Added Bad Block Table Full define to RAID Volume Page 0.
  239. * Added Previous State defines to RAID Physical Disk
  240. * Page 0.
  241. * Added Max Sata Targets define for DiscoveryStatus field
  242. * of SAS IO Unit Page 0.
  243. * Added Device Self Test to Control Flags of SAS IO Unit
  244. * Page 1.
  245. * Added Direct Attach Starting Slot Number define for SAS
  246. * IO Unit Page 2.
  247. * Added new fields in SAS Device Page 2 for enclosure
  248. * mapping.
  249. * Added OwnerDevHandle and Flags field to SAS PHY Page 0.
  250. * Added IOC GPIO Flags define to SAS Enclosure Page 0.
  251. * Fixed the value for MPI_SAS_IOUNIT1_CONTROL_DEV_SATA_SUPPORT.
  252. * 08-03-05 01.05.10 Removed ISDataScrubRate and ISResyncRate from
  253. * Manufacturing Page 4.
  254. * Added MPI_IOUNITPAGE1_SATA_WRITE_CACHE_DISABLE bit.
  255. * Added NumDevsPerEnclosure field to SAS IO Unit page 2.
  256. * Added MPI_SAS_IOUNIT2_FLAGS_HOST_ASSIGNED_PHYS_MAP
  257. * define.
  258. * Added EnclosureHandle field to SAS Expander page 0.
  259. * Removed redundant NumTableEntriesProg field from SAS
  260. * Expander Page 1.
  261. * 08-30-05 01.05.11 Added DeviceID for FC949E and changed the DeviceID for
  262. * SAS1078.
  263. * Added more defines for Manufacturing Page 4 Flags field.
  264. * Added more defines for IOCSettings and added
  265. * ExpanderSpinup field to Bios Page 1.
  266. * Added postpone SATA Init bit to SAS IO Unit Page 1
  267. * ControlFlags.
  268. * Changed LogEntry format for Log Page 0.
  269. * 03-27-06 01.05.12 Added two new Flags defines for Manufacturing Page 4.
  270. * Added Manufacturing Page 7.
  271. * Added MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING.
  272. * Added IOC Page 6.
  273. * Added PrevBootDeviceForm field to CONFIG_PAGE_BIOS_2.
  274. * Added MaxLBAHigh field to RAID Volume Page 0.
  275. * Added Nvdata version fields to SAS IO Unit Page 0.
  276. * Added AdditionalControlFlags, MaxTargetPortConnectTime,
  277. * ReportDeviceMissingDelay, and IODeviceMissingDelay
  278. * fields to SAS IO Unit Page 1.
  279. * 10-11-06 01.05.13 Added NumForceWWID field and ForceWWID array to
  280. * Manufacturing Page 5.
  281. * Added Manufacturing pages 8 through 10.
  282. * Added defines for supported metadata size bits in
  283. * CapabilitiesFlags field of IOC Page 6.
  284. * Added defines for metadata size bits in VolumeSettings
  285. * field of RAID Volume Page 0.
  286. * Added SATA Link Reset settings, Enable SATA Asynchronous
  287. * Notification bit, and HideNonZeroAttachedPhyIdentifiers
  288. * bit to AdditionalControlFlags field of SAS IO Unit
  289. * Page 1.
  290. * Added defines for Enclosure Devices Unmapped and
  291. * Device Limit Exceeded bits in Status field of SAS IO
  292. * Unit Page 2.
  293. * Added more AccessStatus values for SAS Device Page 0.
  294. * Added bit for SATA Asynchronous Notification Support in
  295. * Flags field of SAS Device Page 0.
  296. * 02-28-07 01.05.14 Added ExtFlags field to Manufacturing Page 4.
  297. * Added Disable SMART Polling for CapabilitiesFlags of
  298. * IOC Page 6.
  299. * Added Disable SMART Polling to DeviceSettings of BIOS
  300. * Page 1.
  301. * Added Multi-Port Domain bit for DiscoveryStatus field
  302. * of SAS IO Unit Page.
  303. * Added Multi-Port Domain Illegal flag for SAS IO Unit
  304. * Page 1 AdditionalControlFlags field.
  305. * 05-24-07 01.05.15 Added Hide Physical Disks with Non-Integrated RAID
  306. * Metadata bit to Manufacturing Page 4 ExtFlags field.
  307. * Added Internal Connector to End Device Present bit to
  308. * Expander Page 0 Flags field.
  309. * Fixed define for
  310. * MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED.
  311. * 08-07-07 01.05.16 Added MPI_IOCPAGE6_CAP_FLAGS_MULTIPORT_DRIVE_SUPPORT
  312. * define.
  313. * Added BIOS Page 4 structure.
  314. * Added MPI_RAID_PHYS_DISK1_PATH_MAX define for RAID
  315. * Physcial Disk Page 1.
  316. * 01-15-07 01.05.17 Added additional bit defines for ExtFlags field of
  317. * Manufacturing Page 4.
  318. * Added Solid State Drives Supported bit to IOC Page 6
  319. * Capabilities Flags.
  320. * Added new value for AccessStatus field of SAS Device
  321. * Page 0 (_SATA_NEEDS_INITIALIZATION).
  322. * 03-28-08 01.05.18 Defined new bits in Manufacturing Page 4 ExtFlags field
  323. * to control coercion size and the mixing of SAS and SATA
  324. * SSD drives.
  325. * --------------------------------------------------------------------------
  326. */
  327. #ifndef MPI_CNFG_H
  328. #define MPI_CNFG_H
  329. /*****************************************************************************
  330. *
  331. * C o n f i g M e s s a g e a n d S t r u c t u r e s
  332. *
  333. *****************************************************************************/
  334. typedef struct _CONFIG_PAGE_HEADER
  335. {
  336. U8 PageVersion; /* 00h */
  337. U8 PageLength; /* 01h */
  338. U8 PageNumber; /* 02h */
  339. U8 PageType; /* 03h */
  340. } CONFIG_PAGE_HEADER, MPI_POINTER PTR_CONFIG_PAGE_HEADER,
  341. ConfigPageHeader_t, MPI_POINTER pConfigPageHeader_t;
  342. typedef union _CONFIG_PAGE_HEADER_UNION
  343. {
  344. ConfigPageHeader_t Struct;
  345. U8 Bytes[4];
  346. U16 Word16[2];
  347. U32 Word32;
  348. } ConfigPageHeaderUnion, MPI_POINTER pConfigPageHeaderUnion,
  349. CONFIG_PAGE_HEADER_UNION, MPI_POINTER PTR_CONFIG_PAGE_HEADER_UNION;
  350. typedef struct _CONFIG_EXTENDED_PAGE_HEADER
  351. {
  352. U8 PageVersion; /* 00h */
  353. U8 Reserved1; /* 01h */
  354. U8 PageNumber; /* 02h */
  355. U8 PageType; /* 03h */
  356. U16 ExtPageLength; /* 04h */
  357. U8 ExtPageType; /* 06h */
  358. U8 Reserved2; /* 07h */
  359. } CONFIG_EXTENDED_PAGE_HEADER, MPI_POINTER PTR_CONFIG_EXTENDED_PAGE_HEADER,
  360. ConfigExtendedPageHeader_t, MPI_POINTER pConfigExtendedPageHeader_t;
  361. /****************************************************************************
  362. * PageType field values
  363. ****************************************************************************/
  364. #define MPI_CONFIG_PAGEATTR_READ_ONLY (0x00)
  365. #define MPI_CONFIG_PAGEATTR_CHANGEABLE (0x10)
  366. #define MPI_CONFIG_PAGEATTR_PERSISTENT (0x20)
  367. #define MPI_CONFIG_PAGEATTR_RO_PERSISTENT (0x30)
  368. #define MPI_CONFIG_PAGEATTR_MASK (0xF0)
  369. #define MPI_CONFIG_PAGETYPE_IO_UNIT (0x00)
  370. #define MPI_CONFIG_PAGETYPE_IOC (0x01)
  371. #define MPI_CONFIG_PAGETYPE_BIOS (0x02)
  372. #define MPI_CONFIG_PAGETYPE_SCSI_PORT (0x03)
  373. #define MPI_CONFIG_PAGETYPE_SCSI_DEVICE (0x04)
  374. #define MPI_CONFIG_PAGETYPE_FC_PORT (0x05)
  375. #define MPI_CONFIG_PAGETYPE_FC_DEVICE (0x06)
  376. #define MPI_CONFIG_PAGETYPE_LAN (0x07)
  377. #define MPI_CONFIG_PAGETYPE_RAID_VOLUME (0x08)
  378. #define MPI_CONFIG_PAGETYPE_MANUFACTURING (0x09)
  379. #define MPI_CONFIG_PAGETYPE_RAID_PHYSDISK (0x0A)
  380. #define MPI_CONFIG_PAGETYPE_INBAND (0x0B)
  381. #define MPI_CONFIG_PAGETYPE_EXTENDED (0x0F)
  382. #define MPI_CONFIG_PAGETYPE_MASK (0x0F)
  383. #define MPI_CONFIG_TYPENUM_MASK (0x0FFF)
  384. /****************************************************************************
  385. * ExtPageType field values
  386. ****************************************************************************/
  387. #define MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT (0x10)
  388. #define MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER (0x11)
  389. #define MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE (0x12)
  390. #define MPI_CONFIG_EXTPAGETYPE_SAS_PHY (0x13)
  391. #define MPI_CONFIG_EXTPAGETYPE_LOG (0x14)
  392. #define MPI_CONFIG_EXTPAGETYPE_ENCLOSURE (0x15)
  393. /****************************************************************************
  394. * PageAddress field values
  395. ****************************************************************************/
  396. #define MPI_SCSI_PORT_PGAD_PORT_MASK (0x000000FF)
  397. #define MPI_SCSI_DEVICE_FORM_MASK (0xF0000000)
  398. #define MPI_SCSI_DEVICE_FORM_BUS_TID (0x00000000)
  399. #define MPI_SCSI_DEVICE_TARGET_ID_MASK (0x000000FF)
  400. #define MPI_SCSI_DEVICE_TARGET_ID_SHIFT (0)
  401. #define MPI_SCSI_DEVICE_BUS_MASK (0x0000FF00)
  402. #define MPI_SCSI_DEVICE_BUS_SHIFT (8)
  403. #define MPI_SCSI_DEVICE_FORM_TARGET_MODE (0x10000000)
  404. #define MPI_SCSI_DEVICE_TM_RESPOND_ID_MASK (0x000000FF)
  405. #define MPI_SCSI_DEVICE_TM_RESPOND_ID_SHIFT (0)
  406. #define MPI_SCSI_DEVICE_TM_BUS_MASK (0x0000FF00)
  407. #define MPI_SCSI_DEVICE_TM_BUS_SHIFT (8)
  408. #define MPI_SCSI_DEVICE_TM_INIT_ID_MASK (0x00FF0000)
  409. #define MPI_SCSI_DEVICE_TM_INIT_ID_SHIFT (16)
  410. #define MPI_FC_PORT_PGAD_PORT_MASK (0xF0000000)
  411. #define MPI_FC_PORT_PGAD_PORT_SHIFT (28)
  412. #define MPI_FC_PORT_PGAD_FORM_MASK (0x0F000000)
  413. #define MPI_FC_PORT_PGAD_FORM_INDEX (0x01000000)
  414. #define MPI_FC_PORT_PGAD_INDEX_MASK (0x0000FFFF)
  415. #define MPI_FC_PORT_PGAD_INDEX_SHIFT (0)
  416. #define MPI_FC_DEVICE_PGAD_PORT_MASK (0xF0000000)
  417. #define MPI_FC_DEVICE_PGAD_PORT_SHIFT (28)
  418. #define MPI_FC_DEVICE_PGAD_FORM_MASK (0x0F000000)
  419. #define MPI_FC_DEVICE_PGAD_FORM_NEXT_DID (0x00000000)
  420. #define MPI_FC_DEVICE_PGAD_ND_PORT_MASK (0xF0000000)
  421. #define MPI_FC_DEVICE_PGAD_ND_PORT_SHIFT (28)
  422. #define MPI_FC_DEVICE_PGAD_ND_DID_MASK (0x00FFFFFF)
  423. #define MPI_FC_DEVICE_PGAD_ND_DID_SHIFT (0)
  424. #define MPI_FC_DEVICE_PGAD_FORM_BUS_TID (0x01000000)
  425. #define MPI_FC_DEVICE_PGAD_BT_BUS_MASK (0x0000FF00)
  426. #define MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT (8)
  427. #define MPI_FC_DEVICE_PGAD_BT_TID_MASK (0x000000FF)
  428. #define MPI_FC_DEVICE_PGAD_BT_TID_SHIFT (0)
  429. #define MPI_PHYSDISK_PGAD_PHYSDISKNUM_MASK (0x000000FF)
  430. #define MPI_PHYSDISK_PGAD_PHYSDISKNUM_SHIFT (0)
  431. #define MPI_SAS_EXPAND_PGAD_FORM_MASK (0xF0000000)
  432. #define MPI_SAS_EXPAND_PGAD_FORM_SHIFT (28)
  433. #define MPI_SAS_EXPAND_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
  434. #define MPI_SAS_EXPAND_PGAD_FORM_HANDLE_PHY_NUM (0x00000001)
  435. #define MPI_SAS_EXPAND_PGAD_FORM_HANDLE (0x00000002)
  436. #define MPI_SAS_EXPAND_PGAD_GNH_MASK_HANDLE (0x0000FFFF)
  437. #define MPI_SAS_EXPAND_PGAD_GNH_SHIFT_HANDLE (0)
  438. #define MPI_SAS_EXPAND_PGAD_HPN_MASK_PHY (0x00FF0000)
  439. #define MPI_SAS_EXPAND_PGAD_HPN_SHIFT_PHY (16)
  440. #define MPI_SAS_EXPAND_PGAD_HPN_MASK_HANDLE (0x0000FFFF)
  441. #define MPI_SAS_EXPAND_PGAD_HPN_SHIFT_HANDLE (0)
  442. #define MPI_SAS_EXPAND_PGAD_H_MASK_HANDLE (0x0000FFFF)
  443. #define MPI_SAS_EXPAND_PGAD_H_SHIFT_HANDLE (0)
  444. #define MPI_SAS_DEVICE_PGAD_FORM_MASK (0xF0000000)
  445. #define MPI_SAS_DEVICE_PGAD_FORM_SHIFT (28)
  446. #define MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
  447. #define MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID (0x00000001)
  448. #define MPI_SAS_DEVICE_PGAD_FORM_HANDLE (0x00000002)
  449. #define MPI_SAS_DEVICE_PGAD_GNH_HANDLE_MASK (0x0000FFFF)
  450. #define MPI_SAS_DEVICE_PGAD_GNH_HANDLE_SHIFT (0)
  451. #define MPI_SAS_DEVICE_PGAD_BT_BUS_MASK (0x0000FF00)
  452. #define MPI_SAS_DEVICE_PGAD_BT_BUS_SHIFT (8)
  453. #define MPI_SAS_DEVICE_PGAD_BT_TID_MASK (0x000000FF)
  454. #define MPI_SAS_DEVICE_PGAD_BT_TID_SHIFT (0)
  455. #define MPI_SAS_DEVICE_PGAD_H_HANDLE_MASK (0x0000FFFF)
  456. #define MPI_SAS_DEVICE_PGAD_H_HANDLE_SHIFT (0)
  457. #define MPI_SAS_PHY_PGAD_FORM_MASK (0xF0000000)
  458. #define MPI_SAS_PHY_PGAD_FORM_SHIFT (28)
  459. #define MPI_SAS_PHY_PGAD_FORM_PHY_NUMBER (0x0)
  460. #define MPI_SAS_PHY_PGAD_FORM_PHY_TBL_INDEX (0x1)
  461. #define MPI_SAS_PHY_PGAD_PHY_NUMBER_MASK (0x000000FF)
  462. #define MPI_SAS_PHY_PGAD_PHY_NUMBER_SHIFT (0)
  463. #define MPI_SAS_PHY_PGAD_PHY_TBL_INDEX_MASK (0x0000FFFF)
  464. #define MPI_SAS_PHY_PGAD_PHY_TBL_INDEX_SHIFT (0)
  465. #define MPI_SAS_ENCLOS_PGAD_FORM_MASK (0xF0000000)
  466. #define MPI_SAS_ENCLOS_PGAD_FORM_SHIFT (28)
  467. #define MPI_SAS_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000)
  468. #define MPI_SAS_ENCLOS_PGAD_FORM_HANDLE (0x00000001)
  469. #define MPI_SAS_ENCLOS_PGAD_GNH_HANDLE_MASK (0x0000FFFF)
  470. #define MPI_SAS_ENCLOS_PGAD_GNH_HANDLE_SHIFT (0)
  471. #define MPI_SAS_ENCLOS_PGAD_H_HANDLE_MASK (0x0000FFFF)
  472. #define MPI_SAS_ENCLOS_PGAD_H_HANDLE_SHIFT (0)
  473. /****************************************************************************
  474. * Config Request Message
  475. ****************************************************************************/
  476. typedef struct _MSG_CONFIG
  477. {
  478. U8 Action; /* 00h */
  479. U8 Reserved; /* 01h */
  480. U8 ChainOffset; /* 02h */
  481. U8 Function; /* 03h */
  482. U16 ExtPageLength; /* 04h */
  483. U8 ExtPageType; /* 06h */
  484. U8 MsgFlags; /* 07h */
  485. U32 MsgContext; /* 08h */
  486. U8 Reserved2[8]; /* 0Ch */
  487. CONFIG_PAGE_HEADER Header; /* 14h */
  488. U32 PageAddress; /* 18h */
  489. SGE_IO_UNION PageBufferSGE; /* 1Ch */
  490. } MSG_CONFIG, MPI_POINTER PTR_MSG_CONFIG,
  491. Config_t, MPI_POINTER pConfig_t;
  492. /****************************************************************************
  493. * Action field values
  494. ****************************************************************************/
  495. #define MPI_CONFIG_ACTION_PAGE_HEADER (0x00)
  496. #define MPI_CONFIG_ACTION_PAGE_READ_CURRENT (0x01)
  497. #define MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT (0x02)
  498. #define MPI_CONFIG_ACTION_PAGE_DEFAULT (0x03)
  499. #define MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM (0x04)
  500. #define MPI_CONFIG_ACTION_PAGE_READ_DEFAULT (0x05)
  501. #define MPI_CONFIG_ACTION_PAGE_READ_NVRAM (0x06)
  502. /* Config Reply Message */
  503. typedef struct _MSG_CONFIG_REPLY
  504. {
  505. U8 Action; /* 00h */
  506. U8 Reserved; /* 01h */
  507. U8 MsgLength; /* 02h */
  508. U8 Function; /* 03h */
  509. U16 ExtPageLength; /* 04h */
  510. U8 ExtPageType; /* 06h */
  511. U8 MsgFlags; /* 07h */
  512. U32 MsgContext; /* 08h */
  513. U8 Reserved2[2]; /* 0Ch */
  514. U16 IOCStatus; /* 0Eh */
  515. U32 IOCLogInfo; /* 10h */
  516. CONFIG_PAGE_HEADER Header; /* 14h */
  517. } MSG_CONFIG_REPLY, MPI_POINTER PTR_MSG_CONFIG_REPLY,
  518. ConfigReply_t, MPI_POINTER pConfigReply_t;
  519. /*****************************************************************************
  520. *
  521. * C o n f i g u r a t i o n P a g e s
  522. *
  523. *****************************************************************************/
  524. /****************************************************************************
  525. * Manufacturing Config pages
  526. ****************************************************************************/
  527. #define MPI_MANUFACTPAGE_VENDORID_LSILOGIC (0x1000)
  528. /* Fibre Channel */
  529. #define MPI_MANUFACTPAGE_DEVICEID_FC909 (0x0621)
  530. #define MPI_MANUFACTPAGE_DEVICEID_FC919 (0x0624)
  531. #define MPI_MANUFACTPAGE_DEVICEID_FC929 (0x0622)
  532. #define MPI_MANUFACTPAGE_DEVICEID_FC919X (0x0628)
  533. #define MPI_MANUFACTPAGE_DEVICEID_FC929X (0x0626)
  534. #define MPI_MANUFACTPAGE_DEVICEID_FC939X (0x0642)
  535. #define MPI_MANUFACTPAGE_DEVICEID_FC949X (0x0640)
  536. #define MPI_MANUFACTPAGE_DEVICEID_FC949E (0x0646)
  537. /* SCSI */
  538. #define MPI_MANUFACTPAGE_DEVID_53C1030 (0x0030)
  539. #define MPI_MANUFACTPAGE_DEVID_53C1030ZC (0x0031)
  540. #define MPI_MANUFACTPAGE_DEVID_1030_53C1035 (0x0032)
  541. #define MPI_MANUFACTPAGE_DEVID_1030ZC_53C1035 (0x0033)
  542. #define MPI_MANUFACTPAGE_DEVID_53C1035 (0x0040)
  543. #define MPI_MANUFACTPAGE_DEVID_53C1035ZC (0x0041)
  544. /* SAS */
  545. #define MPI_MANUFACTPAGE_DEVID_SAS1064 (0x0050)
  546. #define MPI_MANUFACTPAGE_DEVID_SAS1064A (0x005C)
  547. #define MPI_MANUFACTPAGE_DEVID_SAS1064E (0x0056)
  548. #define MPI_MANUFACTPAGE_DEVID_SAS1066 (0x005E)
  549. #define MPI_MANUFACTPAGE_DEVID_SAS1066E (0x005A)
  550. #define MPI_MANUFACTPAGE_DEVID_SAS1068 (0x0054)
  551. #define MPI_MANUFACTPAGE_DEVID_SAS1068E (0x0058)
  552. #define MPI_MANUFACTPAGE_DEVID_SAS1068_820XELP (0x0059)
  553. #define MPI_MANUFACTPAGE_DEVID_SAS1078 (0x0062)
  554. typedef struct _CONFIG_PAGE_MANUFACTURING_0
  555. {
  556. CONFIG_PAGE_HEADER Header; /* 00h */
  557. U8 ChipName[16]; /* 04h */
  558. U8 ChipRevision[8]; /* 14h */
  559. U8 BoardName[16]; /* 1Ch */
  560. U8 BoardAssembly[16]; /* 2Ch */
  561. U8 BoardTracerNumber[16]; /* 3Ch */
  562. } CONFIG_PAGE_MANUFACTURING_0, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_0,
  563. ManufacturingPage0_t, MPI_POINTER pManufacturingPage0_t;
  564. #define MPI_MANUFACTURING0_PAGEVERSION (0x00)
  565. typedef struct _CONFIG_PAGE_MANUFACTURING_1
  566. {
  567. CONFIG_PAGE_HEADER Header; /* 00h */
  568. U8 VPD[256]; /* 04h */
  569. } CONFIG_PAGE_MANUFACTURING_1, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_1,
  570. ManufacturingPage1_t, MPI_POINTER pManufacturingPage1_t;
  571. #define MPI_MANUFACTURING1_PAGEVERSION (0x00)
  572. typedef struct _MPI_CHIP_REVISION_ID
  573. {
  574. U16 DeviceID; /* 00h */
  575. U8 PCIRevisionID; /* 02h */
  576. U8 Reserved; /* 03h */
  577. } MPI_CHIP_REVISION_ID, MPI_POINTER PTR_MPI_CHIP_REVISION_ID,
  578. MpiChipRevisionId_t, MPI_POINTER pMpiChipRevisionId_t;
  579. /*
  580. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  581. * one and check Header.PageLength at runtime.
  582. */
  583. #ifndef MPI_MAN_PAGE_2_HW_SETTINGS_WORDS
  584. #define MPI_MAN_PAGE_2_HW_SETTINGS_WORDS (1)
  585. #endif
  586. typedef struct _CONFIG_PAGE_MANUFACTURING_2
  587. {
  588. CONFIG_PAGE_HEADER Header; /* 00h */
  589. MPI_CHIP_REVISION_ID ChipId; /* 04h */
  590. U32 HwSettings[MPI_MAN_PAGE_2_HW_SETTINGS_WORDS];/* 08h */
  591. } CONFIG_PAGE_MANUFACTURING_2, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_2,
  592. ManufacturingPage2_t, MPI_POINTER pManufacturingPage2_t;
  593. #define MPI_MANUFACTURING2_PAGEVERSION (0x00)
  594. /*
  595. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  596. * one and check Header.PageLength at runtime.
  597. */
  598. #ifndef MPI_MAN_PAGE_3_INFO_WORDS
  599. #define MPI_MAN_PAGE_3_INFO_WORDS (1)
  600. #endif
  601. typedef struct _CONFIG_PAGE_MANUFACTURING_3
  602. {
  603. CONFIG_PAGE_HEADER Header; /* 00h */
  604. MPI_CHIP_REVISION_ID ChipId; /* 04h */
  605. U32 Info[MPI_MAN_PAGE_3_INFO_WORDS];/* 08h */
  606. } CONFIG_PAGE_MANUFACTURING_3, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_3,
  607. ManufacturingPage3_t, MPI_POINTER pManufacturingPage3_t;
  608. #define MPI_MANUFACTURING3_PAGEVERSION (0x00)
  609. typedef struct _CONFIG_PAGE_MANUFACTURING_4
  610. {
  611. CONFIG_PAGE_HEADER Header; /* 00h */
  612. U32 Reserved1; /* 04h */
  613. U8 InfoOffset0; /* 08h */
  614. U8 InfoSize0; /* 09h */
  615. U8 InfoOffset1; /* 0Ah */
  616. U8 InfoSize1; /* 0Bh */
  617. U8 InquirySize; /* 0Ch */
  618. U8 Flags; /* 0Dh */
  619. U16 ExtFlags; /* 0Eh */
  620. U8 InquiryData[56]; /* 10h */
  621. U32 ISVolumeSettings; /* 48h */
  622. U32 IMEVolumeSettings; /* 4Ch */
  623. U32 IMVolumeSettings; /* 50h */
  624. U32 Reserved3; /* 54h */
  625. U32 Reserved4; /* 58h */
  626. U32 Reserved5; /* 5Ch */
  627. U8 IMEDataScrubRate; /* 60h */
  628. U8 IMEResyncRate; /* 61h */
  629. U16 Reserved6; /* 62h */
  630. U8 IMDataScrubRate; /* 64h */
  631. U8 IMResyncRate; /* 65h */
  632. U16 Reserved7; /* 66h */
  633. U32 Reserved8; /* 68h */
  634. U32 Reserved9; /* 6Ch */
  635. } CONFIG_PAGE_MANUFACTURING_4, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_4,
  636. ManufacturingPage4_t, MPI_POINTER pManufacturingPage4_t;
  637. #define MPI_MANUFACTURING4_PAGEVERSION (0x05)
  638. /* defines for the Flags field */
  639. #define MPI_MANPAGE4_FORCE_BAD_BLOCK_TABLE (0x80)
  640. #define MPI_MANPAGE4_FORCE_OFFLINE_FAILOVER (0x40)
  641. #define MPI_MANPAGE4_IME_DISABLE (0x20)
  642. #define MPI_MANPAGE4_IM_DISABLE (0x10)
  643. #define MPI_MANPAGE4_IS_DISABLE (0x08)
  644. #define MPI_MANPAGE4_IR_MODEPAGE8_DISABLE (0x04)
  645. #define MPI_MANPAGE4_IM_RESYNC_CACHE_ENABLE (0x02)
  646. #define MPI_MANPAGE4_IR_NO_MIX_SAS_SATA (0x01)
  647. /* defines for the ExtFlags field */
  648. #define MPI_MANPAGE4_EXTFLAGS_MASK_COERCION_SIZE (0x0180)
  649. #define MPI_MANPAGE4_EXTFLAGS_SHIFT_COERCION_SIZE (7)
  650. #define MPI_MANPAGE4_EXTFLAGS_1GB_COERCION_SIZE (0)
  651. #define MPI_MANPAGE4_EXTFLAGS_128MB_COERCION_SIZE (1)
  652. #define MPI_MANPAGE4_EXTFLAGS_NO_MIX_SSD_SAS_SATA (0x0040)
  653. #define MPI_MANPAGE4_EXTFLAGS_MIX_SSD_AND_NON_SSD (0x0020)
  654. #define MPI_MANPAGE4_EXTFLAGS_DUAL_PORT_SUPPORT (0x0010)
  655. #define MPI_MANPAGE4_EXTFLAGS_HIDE_NON_IR_METADATA (0x0008)
  656. #define MPI_MANPAGE4_EXTFLAGS_SAS_CACHE_DISABLE (0x0004)
  657. #define MPI_MANPAGE4_EXTFLAGS_SATA_CACHE_DISABLE (0x0002)
  658. #define MPI_MANPAGE4_EXTFLAGS_LEGACY_MODE (0x0001)
  659. #ifndef MPI_MANPAGE5_NUM_FORCEWWID
  660. #define MPI_MANPAGE5_NUM_FORCEWWID (1)
  661. #endif
  662. typedef struct _CONFIG_PAGE_MANUFACTURING_5
  663. {
  664. CONFIG_PAGE_HEADER Header; /* 00h */
  665. U64 BaseWWID; /* 04h */
  666. U8 Flags; /* 0Ch */
  667. U8 NumForceWWID; /* 0Dh */
  668. U16 Reserved2; /* 0Eh */
  669. U32 Reserved3; /* 10h */
  670. U32 Reserved4; /* 14h */
  671. U64 ForceWWID[MPI_MANPAGE5_NUM_FORCEWWID]; /* 18h */
  672. } CONFIG_PAGE_MANUFACTURING_5, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_5,
  673. ManufacturingPage5_t, MPI_POINTER pManufacturingPage5_t;
  674. #define MPI_MANUFACTURING5_PAGEVERSION (0x02)
  675. /* defines for the Flags field */
  676. #define MPI_MANPAGE5_TWO_WWID_PER_PHY (0x01)
  677. typedef struct _CONFIG_PAGE_MANUFACTURING_6
  678. {
  679. CONFIG_PAGE_HEADER Header; /* 00h */
  680. U32 ProductSpecificInfo;/* 04h */
  681. } CONFIG_PAGE_MANUFACTURING_6, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_6,
  682. ManufacturingPage6_t, MPI_POINTER pManufacturingPage6_t;
  683. #define MPI_MANUFACTURING6_PAGEVERSION (0x00)
  684. typedef struct _MPI_MANPAGE7_CONNECTOR_INFO
  685. {
  686. U32 Pinout; /* 00h */
  687. U8 Connector[16]; /* 04h */
  688. U8 Location; /* 14h */
  689. U8 Reserved1; /* 15h */
  690. U16 Slot; /* 16h */
  691. U32 Reserved2; /* 18h */
  692. } MPI_MANPAGE7_CONNECTOR_INFO, MPI_POINTER PTR_MPI_MANPAGE7_CONNECTOR_INFO,
  693. MpiManPage7ConnectorInfo_t, MPI_POINTER pMpiManPage7ConnectorInfo_t;
  694. /* defines for the Pinout field */
  695. #define MPI_MANPAGE7_PINOUT_SFF_8484_L4 (0x00080000)
  696. #define MPI_MANPAGE7_PINOUT_SFF_8484_L3 (0x00040000)
  697. #define MPI_MANPAGE7_PINOUT_SFF_8484_L2 (0x00020000)
  698. #define MPI_MANPAGE7_PINOUT_SFF_8484_L1 (0x00010000)
  699. #define MPI_MANPAGE7_PINOUT_SFF_8470_L4 (0x00000800)
  700. #define MPI_MANPAGE7_PINOUT_SFF_8470_L3 (0x00000400)
  701. #define MPI_MANPAGE7_PINOUT_SFF_8470_L2 (0x00000200)
  702. #define MPI_MANPAGE7_PINOUT_SFF_8470_L1 (0x00000100)
  703. #define MPI_MANPAGE7_PINOUT_SFF_8482 (0x00000002)
  704. #define MPI_MANPAGE7_PINOUT_CONNECTION_UNKNOWN (0x00000001)
  705. /* defines for the Location field */
  706. #define MPI_MANPAGE7_LOCATION_UNKNOWN (0x01)
  707. #define MPI_MANPAGE7_LOCATION_INTERNAL (0x02)
  708. #define MPI_MANPAGE7_LOCATION_EXTERNAL (0x04)
  709. #define MPI_MANPAGE7_LOCATION_SWITCHABLE (0x08)
  710. #define MPI_MANPAGE7_LOCATION_AUTO (0x10)
  711. #define MPI_MANPAGE7_LOCATION_NOT_PRESENT (0x20)
  712. #define MPI_MANPAGE7_LOCATION_NOT_CONNECTED (0x80)
  713. /*
  714. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  715. * one and check NumPhys at runtime.
  716. */
  717. #ifndef MPI_MANPAGE7_CONNECTOR_INFO_MAX
  718. #define MPI_MANPAGE7_CONNECTOR_INFO_MAX (1)
  719. #endif
  720. typedef struct _CONFIG_PAGE_MANUFACTURING_7
  721. {
  722. CONFIG_PAGE_HEADER Header; /* 00h */
  723. U32 Reserved1; /* 04h */
  724. U32 Reserved2; /* 08h */
  725. U32 Flags; /* 0Ch */
  726. U8 EnclosureName[16]; /* 10h */
  727. U8 NumPhys; /* 20h */
  728. U8 Reserved3; /* 21h */
  729. U16 Reserved4; /* 22h */
  730. MPI_MANPAGE7_CONNECTOR_INFO ConnectorInfo[MPI_MANPAGE7_CONNECTOR_INFO_MAX]; /* 24h */
  731. } CONFIG_PAGE_MANUFACTURING_7, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_7,
  732. ManufacturingPage7_t, MPI_POINTER pManufacturingPage7_t;
  733. #define MPI_MANUFACTURING7_PAGEVERSION (0x00)
  734. /* defines for the Flags field */
  735. #define MPI_MANPAGE7_FLAG_USE_SLOT_INFO (0x00000001)
  736. typedef struct _CONFIG_PAGE_MANUFACTURING_8
  737. {
  738. CONFIG_PAGE_HEADER Header; /* 00h */
  739. U32 ProductSpecificInfo;/* 04h */
  740. } CONFIG_PAGE_MANUFACTURING_8, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_8,
  741. ManufacturingPage8_t, MPI_POINTER pManufacturingPage8_t;
  742. #define MPI_MANUFACTURING8_PAGEVERSION (0x00)
  743. typedef struct _CONFIG_PAGE_MANUFACTURING_9
  744. {
  745. CONFIG_PAGE_HEADER Header; /* 00h */
  746. U32 ProductSpecificInfo;/* 04h */
  747. } CONFIG_PAGE_MANUFACTURING_9, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_9,
  748. ManufacturingPage9_t, MPI_POINTER pManufacturingPage9_t;
  749. #define MPI_MANUFACTURING9_PAGEVERSION (0x00)
  750. typedef struct _CONFIG_PAGE_MANUFACTURING_10
  751. {
  752. CONFIG_PAGE_HEADER Header; /* 00h */
  753. U32 ProductSpecificInfo;/* 04h */
  754. } CONFIG_PAGE_MANUFACTURING_10, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_10,
  755. ManufacturingPage10_t, MPI_POINTER pManufacturingPage10_t;
  756. #define MPI_MANUFACTURING10_PAGEVERSION (0x00)
  757. /****************************************************************************
  758. * IO Unit Config Pages
  759. ****************************************************************************/
  760. typedef struct _CONFIG_PAGE_IO_UNIT_0
  761. {
  762. CONFIG_PAGE_HEADER Header; /* 00h */
  763. U64 UniqueValue; /* 04h */
  764. } CONFIG_PAGE_IO_UNIT_0, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_0,
  765. IOUnitPage0_t, MPI_POINTER pIOUnitPage0_t;
  766. #define MPI_IOUNITPAGE0_PAGEVERSION (0x00)
  767. typedef struct _CONFIG_PAGE_IO_UNIT_1
  768. {
  769. CONFIG_PAGE_HEADER Header; /* 00h */
  770. U32 Flags; /* 04h */
  771. } CONFIG_PAGE_IO_UNIT_1, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_1,
  772. IOUnitPage1_t, MPI_POINTER pIOUnitPage1_t;
  773. #define MPI_IOUNITPAGE1_PAGEVERSION (0x02)
  774. /* IO Unit Page 1 Flags defines */
  775. #define MPI_IOUNITPAGE1_MULTI_FUNCTION (0x00000000)
  776. #define MPI_IOUNITPAGE1_SINGLE_FUNCTION (0x00000001)
  777. #define MPI_IOUNITPAGE1_MULTI_PATHING (0x00000002)
  778. #define MPI_IOUNITPAGE1_SINGLE_PATHING (0x00000000)
  779. #define MPI_IOUNITPAGE1_IR_USE_STATIC_VOLUME_ID (0x00000004)
  780. #define MPI_IOUNITPAGE1_DISABLE_QUEUE_FULL_HANDLING (0x00000020)
  781. #define MPI_IOUNITPAGE1_DISABLE_IR (0x00000040)
  782. #define MPI_IOUNITPAGE1_FORCE_32 (0x00000080)
  783. #define MPI_IOUNITPAGE1_NATIVE_COMMAND_Q_DISABLE (0x00000100)
  784. #define MPI_IOUNITPAGE1_SATA_WRITE_CACHE_DISABLE (0x00000200)
  785. typedef struct _MPI_ADAPTER_INFO
  786. {
  787. U8 PciBusNumber; /* 00h */
  788. U8 PciDeviceAndFunctionNumber; /* 01h */
  789. U16 AdapterFlags; /* 02h */
  790. } MPI_ADAPTER_INFO, MPI_POINTER PTR_MPI_ADAPTER_INFO,
  791. MpiAdapterInfo_t, MPI_POINTER pMpiAdapterInfo_t;
  792. #define MPI_ADAPTER_INFO_FLAGS_EMBEDDED (0x0001)
  793. #define MPI_ADAPTER_INFO_FLAGS_INIT_STATUS (0x0002)
  794. typedef struct _CONFIG_PAGE_IO_UNIT_2
  795. {
  796. CONFIG_PAGE_HEADER Header; /* 00h */
  797. U32 Flags; /* 04h */
  798. U32 BiosVersion; /* 08h */
  799. MPI_ADAPTER_INFO AdapterOrder[4]; /* 0Ch */
  800. U32 Reserved1; /* 1Ch */
  801. } CONFIG_PAGE_IO_UNIT_2, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_2,
  802. IOUnitPage2_t, MPI_POINTER pIOUnitPage2_t;
  803. #define MPI_IOUNITPAGE2_PAGEVERSION (0x02)
  804. #define MPI_IOUNITPAGE2_FLAGS_PAUSE_ON_ERROR (0x00000002)
  805. #define MPI_IOUNITPAGE2_FLAGS_VERBOSE_ENABLE (0x00000004)
  806. #define MPI_IOUNITPAGE2_FLAGS_COLOR_VIDEO_DISABLE (0x00000008)
  807. #define MPI_IOUNITPAGE2_FLAGS_DONT_HOOK_INT_40 (0x00000010)
  808. #define MPI_IOUNITPAGE2_FLAGS_DEV_LIST_DISPLAY_MASK (0x000000E0)
  809. #define MPI_IOUNITPAGE2_FLAGS_INSTALLED_DEV_DISPLAY (0x00000000)
  810. #define MPI_IOUNITPAGE2_FLAGS_ADAPTER_DISPLAY (0x00000020)
  811. #define MPI_IOUNITPAGE2_FLAGS_ADAPTER_DEV_DISPLAY (0x00000040)
  812. /*
  813. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  814. * one and check Header.PageLength at runtime.
  815. */
  816. #ifndef MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX
  817. #define MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX (1)
  818. #endif
  819. typedef struct _CONFIG_PAGE_IO_UNIT_3
  820. {
  821. CONFIG_PAGE_HEADER Header; /* 00h */
  822. U8 GPIOCount; /* 04h */
  823. U8 Reserved1; /* 05h */
  824. U16 Reserved2; /* 06h */
  825. U16 GPIOVal[MPI_IO_UNIT_PAGE_3_GPIO_VAL_MAX]; /* 08h */
  826. } CONFIG_PAGE_IO_UNIT_3, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_3,
  827. IOUnitPage3_t, MPI_POINTER pIOUnitPage3_t;
  828. #define MPI_IOUNITPAGE3_PAGEVERSION (0x01)
  829. #define MPI_IOUNITPAGE3_GPIO_FUNCTION_MASK (0xFC)
  830. #define MPI_IOUNITPAGE3_GPIO_FUNCTION_SHIFT (2)
  831. #define MPI_IOUNITPAGE3_GPIO_SETTING_OFF (0x00)
  832. #define MPI_IOUNITPAGE3_GPIO_SETTING_ON (0x01)
  833. typedef struct _CONFIG_PAGE_IO_UNIT_4
  834. {
  835. CONFIG_PAGE_HEADER Header; /* 00h */
  836. U32 Reserved1; /* 04h */
  837. SGE_SIMPLE_UNION FWImageSGE; /* 08h */
  838. } CONFIG_PAGE_IO_UNIT_4, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_4,
  839. IOUnitPage4_t, MPI_POINTER pIOUnitPage4_t;
  840. #define MPI_IOUNITPAGE4_PAGEVERSION (0x00)
  841. /****************************************************************************
  842. * IOC Config Pages
  843. ****************************************************************************/
  844. typedef struct _CONFIG_PAGE_IOC_0
  845. {
  846. CONFIG_PAGE_HEADER Header; /* 00h */
  847. U32 TotalNVStore; /* 04h */
  848. U32 FreeNVStore; /* 08h */
  849. U16 VendorID; /* 0Ch */
  850. U16 DeviceID; /* 0Eh */
  851. U8 RevisionID; /* 10h */
  852. U8 Reserved[3]; /* 11h */
  853. U32 ClassCode; /* 14h */
  854. U16 SubsystemVendorID; /* 18h */
  855. U16 SubsystemID; /* 1Ah */
  856. } CONFIG_PAGE_IOC_0, MPI_POINTER PTR_CONFIG_PAGE_IOC_0,
  857. IOCPage0_t, MPI_POINTER pIOCPage0_t;
  858. #define MPI_IOCPAGE0_PAGEVERSION (0x01)
  859. typedef struct _CONFIG_PAGE_IOC_1
  860. {
  861. CONFIG_PAGE_HEADER Header; /* 00h */
  862. U32 Flags; /* 04h */
  863. U32 CoalescingTimeout; /* 08h */
  864. U8 CoalescingDepth; /* 0Ch */
  865. U8 PCISlotNum; /* 0Dh */
  866. U8 Reserved[2]; /* 0Eh */
  867. } CONFIG_PAGE_IOC_1, MPI_POINTER PTR_CONFIG_PAGE_IOC_1,
  868. IOCPage1_t, MPI_POINTER pIOCPage1_t;
  869. #define MPI_IOCPAGE1_PAGEVERSION (0x03)
  870. /* defines for the Flags field */
  871. #define MPI_IOCPAGE1_EEDP_MODE_MASK (0x07000000)
  872. #define MPI_IOCPAGE1_EEDP_MODE_OFF (0x00000000)
  873. #define MPI_IOCPAGE1_EEDP_MODE_T10 (0x01000000)
  874. #define MPI_IOCPAGE1_EEDP_MODE_LSI_1 (0x02000000)
  875. #define MPI_IOCPAGE1_INITIATOR_CONTEXT_REPLY_DISABLE (0x00000010)
  876. #define MPI_IOCPAGE1_REPLY_COALESCING (0x00000001)
  877. #define MPI_IOCPAGE1_PCISLOTNUM_UNKNOWN (0xFF)
  878. typedef struct _CONFIG_PAGE_IOC_2_RAID_VOL
  879. {
  880. U8 VolumeID; /* 00h */
  881. U8 VolumeBus; /* 01h */
  882. U8 VolumeIOC; /* 02h */
  883. U8 VolumePageNumber; /* 03h */
  884. U8 VolumeType; /* 04h */
  885. U8 Flags; /* 05h */
  886. U16 Reserved3; /* 06h */
  887. } CONFIG_PAGE_IOC_2_RAID_VOL, MPI_POINTER PTR_CONFIG_PAGE_IOC_2_RAID_VOL,
  888. ConfigPageIoc2RaidVol_t, MPI_POINTER pConfigPageIoc2RaidVol_t;
  889. /* IOC Page 2 Volume RAID Type values, also used in RAID Volume pages */
  890. #define MPI_RAID_VOL_TYPE_IS (0x00)
  891. #define MPI_RAID_VOL_TYPE_IME (0x01)
  892. #define MPI_RAID_VOL_TYPE_IM (0x02)
  893. #define MPI_RAID_VOL_TYPE_RAID_5 (0x03)
  894. #define MPI_RAID_VOL_TYPE_RAID_6 (0x04)
  895. #define MPI_RAID_VOL_TYPE_RAID_10 (0x05)
  896. #define MPI_RAID_VOL_TYPE_RAID_50 (0x06)
  897. #define MPI_RAID_VOL_TYPE_UNKNOWN (0xFF)
  898. /* IOC Page 2 Volume Flags values */
  899. #define MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE (0x08)
  900. /*
  901. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  902. * one and check Header.PageLength at runtime.
  903. */
  904. #ifndef MPI_IOC_PAGE_2_RAID_VOLUME_MAX
  905. #define MPI_IOC_PAGE_2_RAID_VOLUME_MAX (1)
  906. #endif
  907. typedef struct _CONFIG_PAGE_IOC_2
  908. {
  909. CONFIG_PAGE_HEADER Header; /* 00h */
  910. U32 CapabilitiesFlags; /* 04h */
  911. U8 NumActiveVolumes; /* 08h */
  912. U8 MaxVolumes; /* 09h */
  913. U8 NumActivePhysDisks; /* 0Ah */
  914. U8 MaxPhysDisks; /* 0Bh */
  915. CONFIG_PAGE_IOC_2_RAID_VOL RaidVolume[MPI_IOC_PAGE_2_RAID_VOLUME_MAX];/* 0Ch */
  916. } CONFIG_PAGE_IOC_2, MPI_POINTER PTR_CONFIG_PAGE_IOC_2,
  917. IOCPage2_t, MPI_POINTER pIOCPage2_t;
  918. #define MPI_IOCPAGE2_PAGEVERSION (0x04)
  919. /* IOC Page 2 Capabilities flags */
  920. #define MPI_IOCPAGE2_CAP_FLAGS_IS_SUPPORT (0x00000001)
  921. #define MPI_IOCPAGE2_CAP_FLAGS_IME_SUPPORT (0x00000002)
  922. #define MPI_IOCPAGE2_CAP_FLAGS_IM_SUPPORT (0x00000004)
  923. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_5_SUPPORT (0x00000008)
  924. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_6_SUPPORT (0x00000010)
  925. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_10_SUPPORT (0x00000020)
  926. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_50_SUPPORT (0x00000040)
  927. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING (0x10000000)
  928. #define MPI_IOCPAGE2_CAP_FLAGS_SES_SUPPORT (0x20000000)
  929. #define MPI_IOCPAGE2_CAP_FLAGS_SAFTE_SUPPORT (0x40000000)
  930. #define MPI_IOCPAGE2_CAP_FLAGS_CROSS_CHANNEL_SUPPORT (0x80000000)
  931. typedef struct _IOC_3_PHYS_DISK
  932. {
  933. U8 PhysDiskID; /* 00h */
  934. U8 PhysDiskBus; /* 01h */
  935. U8 PhysDiskIOC; /* 02h */
  936. U8 PhysDiskNum; /* 03h */
  937. } IOC_3_PHYS_DISK, MPI_POINTER PTR_IOC_3_PHYS_DISK,
  938. Ioc3PhysDisk_t, MPI_POINTER pIoc3PhysDisk_t;
  939. /*
  940. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  941. * one and check Header.PageLength at runtime.
  942. */
  943. #ifndef MPI_IOC_PAGE_3_PHYSDISK_MAX
  944. #define MPI_IOC_PAGE_3_PHYSDISK_MAX (1)
  945. #endif
  946. typedef struct _CONFIG_PAGE_IOC_3
  947. {
  948. CONFIG_PAGE_HEADER Header; /* 00h */
  949. U8 NumPhysDisks; /* 04h */
  950. U8 Reserved1; /* 05h */
  951. U16 Reserved2; /* 06h */
  952. IOC_3_PHYS_DISK PhysDisk[MPI_IOC_PAGE_3_PHYSDISK_MAX]; /* 08h */
  953. } CONFIG_PAGE_IOC_3, MPI_POINTER PTR_CONFIG_PAGE_IOC_3,
  954. IOCPage3_t, MPI_POINTER pIOCPage3_t;
  955. #define MPI_IOCPAGE3_PAGEVERSION (0x00)
  956. typedef struct _IOC_4_SEP
  957. {
  958. U8 SEPTargetID; /* 00h */
  959. U8 SEPBus; /* 01h */
  960. U16 Reserved; /* 02h */
  961. } IOC_4_SEP, MPI_POINTER PTR_IOC_4_SEP,
  962. Ioc4Sep_t, MPI_POINTER pIoc4Sep_t;
  963. /*
  964. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  965. * one and check Header.PageLength at runtime.
  966. */
  967. #ifndef MPI_IOC_PAGE_4_SEP_MAX
  968. #define MPI_IOC_PAGE_4_SEP_MAX (1)
  969. #endif
  970. typedef struct _CONFIG_PAGE_IOC_4
  971. {
  972. CONFIG_PAGE_HEADER Header; /* 00h */
  973. U8 ActiveSEP; /* 04h */
  974. U8 MaxSEP; /* 05h */
  975. U16 Reserved1; /* 06h */
  976. IOC_4_SEP SEP[MPI_IOC_PAGE_4_SEP_MAX]; /* 08h */
  977. } CONFIG_PAGE_IOC_4, MPI_POINTER PTR_CONFIG_PAGE_IOC_4,
  978. IOCPage4_t, MPI_POINTER pIOCPage4_t;
  979. #define MPI_IOCPAGE4_PAGEVERSION (0x00)
  980. typedef struct _IOC_5_HOT_SPARE
  981. {
  982. U8 PhysDiskNum; /* 00h */
  983. U8 Reserved; /* 01h */
  984. U8 HotSparePool; /* 02h */
  985. U8 Flags; /* 03h */
  986. } IOC_5_HOT_SPARE, MPI_POINTER PTR_IOC_5_HOT_SPARE,
  987. Ioc5HotSpare_t, MPI_POINTER pIoc5HotSpare_t;
  988. /* IOC Page 5 HotSpare Flags */
  989. #define MPI_IOC_PAGE_5_HOT_SPARE_ACTIVE (0x01)
  990. /*
  991. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  992. * one and check Header.PageLength at runtime.
  993. */
  994. #ifndef MPI_IOC_PAGE_5_HOT_SPARE_MAX
  995. #define MPI_IOC_PAGE_5_HOT_SPARE_MAX (1)
  996. #endif
  997. typedef struct _CONFIG_PAGE_IOC_5
  998. {
  999. CONFIG_PAGE_HEADER Header; /* 00h */
  1000. U32 Reserved1; /* 04h */
  1001. U8 NumHotSpares; /* 08h */
  1002. U8 Reserved2; /* 09h */
  1003. U16 Reserved3; /* 0Ah */
  1004. IOC_5_HOT_SPARE HotSpare[MPI_IOC_PAGE_5_HOT_SPARE_MAX]; /* 0Ch */
  1005. } CONFIG_PAGE_IOC_5, MPI_POINTER PTR_CONFIG_PAGE_IOC_5,
  1006. IOCPage5_t, MPI_POINTER pIOCPage5_t;
  1007. #define MPI_IOCPAGE5_PAGEVERSION (0x00)
  1008. typedef struct _CONFIG_PAGE_IOC_6
  1009. {
  1010. CONFIG_PAGE_HEADER Header; /* 00h */
  1011. U32 CapabilitiesFlags; /* 04h */
  1012. U8 MaxDrivesIS; /* 08h */
  1013. U8 MaxDrivesIM; /* 09h */
  1014. U8 MaxDrivesIME; /* 0Ah */
  1015. U8 Reserved1; /* 0Bh */
  1016. U8 MinDrivesIS; /* 0Ch */
  1017. U8 MinDrivesIM; /* 0Dh */
  1018. U8 MinDrivesIME; /* 0Eh */
  1019. U8 Reserved2; /* 0Fh */
  1020. U8 MaxGlobalHotSpares; /* 10h */
  1021. U8 Reserved3; /* 11h */
  1022. U16 Reserved4; /* 12h */
  1023. U32 Reserved5; /* 14h */
  1024. U32 SupportedStripeSizeMapIS; /* 18h */
  1025. U32 SupportedStripeSizeMapIME; /* 1Ch */
  1026. U32 Reserved6; /* 20h */
  1027. U8 MetadataSize; /* 24h */
  1028. U8 Reserved7; /* 25h */
  1029. U16 Reserved8; /* 26h */
  1030. U16 MaxBadBlockTableEntries; /* 28h */
  1031. U16 Reserved9; /* 2Ah */
  1032. U16 IRNvsramUsage; /* 2Ch */
  1033. U16 Reserved10; /* 2Eh */
  1034. U32 IRNvsramVersion; /* 30h */
  1035. U32 Reserved11; /* 34h */
  1036. U32 Reserved12; /* 38h */
  1037. } CONFIG_PAGE_IOC_6, MPI_POINTER PTR_CONFIG_PAGE_IOC_6,
  1038. IOCPage6_t, MPI_POINTER pIOCPage6_t;
  1039. #define MPI_IOCPAGE6_PAGEVERSION (0x01)
  1040. /* IOC Page 6 Capabilities Flags */
  1041. #define MPI_IOCPAGE6_CAP_FLAGS_SSD_SUPPORT (0x00000020)
  1042. #define MPI_IOCPAGE6_CAP_FLAGS_MULTIPORT_DRIVE_SUPPORT (0x00000010)
  1043. #define MPI_IOCPAGE6_CAP_FLAGS_DISABLE_SMART_POLLING (0x00000008)
  1044. #define MPI_IOCPAGE6_CAP_FLAGS_MASK_METADATA_SIZE (0x00000006)
  1045. #define MPI_IOCPAGE6_CAP_FLAGS_64MB_METADATA_SIZE (0x00000000)
  1046. #define MPI_IOCPAGE6_CAP_FLAGS_512MB_METADATA_SIZE (0x00000002)
  1047. #define MPI_IOCPAGE6_CAP_FLAGS_GLOBAL_HOT_SPARE (0x00000001)
  1048. /****************************************************************************
  1049. * BIOS Config Pages
  1050. ****************************************************************************/
  1051. typedef struct _CONFIG_PAGE_BIOS_1
  1052. {
  1053. CONFIG_PAGE_HEADER Header; /* 00h */
  1054. U32 BiosOptions; /* 04h */
  1055. U32 IOCSettings; /* 08h */
  1056. U32 Reserved1; /* 0Ch */
  1057. U32 DeviceSettings; /* 10h */
  1058. U16 NumberOfDevices; /* 14h */
  1059. U8 ExpanderSpinup; /* 16h */
  1060. U8 Reserved2; /* 17h */
  1061. U16 IOTimeoutBlockDevicesNonRM; /* 18h */
  1062. U16 IOTimeoutSequential; /* 1Ah */
  1063. U16 IOTimeoutOther; /* 1Ch */
  1064. U16 IOTimeoutBlockDevicesRM; /* 1Eh */
  1065. } CONFIG_PAGE_BIOS_1, MPI_POINTER PTR_CONFIG_PAGE_BIOS_1,
  1066. BIOSPage1_t, MPI_POINTER pBIOSPage1_t;
  1067. #define MPI_BIOSPAGE1_PAGEVERSION (0x03)
  1068. /* values for the BiosOptions field */
  1069. #define MPI_BIOSPAGE1_OPTIONS_SPI_ENABLE (0x00000400)
  1070. #define MPI_BIOSPAGE1_OPTIONS_FC_ENABLE (0x00000200)
  1071. #define MPI_BIOSPAGE1_OPTIONS_SAS_ENABLE (0x00000100)
  1072. #define MPI_BIOSPAGE1_OPTIONS_DISABLE_BIOS (0x00000001)
  1073. /* values for the IOCSettings field */
  1074. #define MPI_BIOSPAGE1_IOCSET_MASK_INITIAL_SPINUP_DELAY (0x0F000000)
  1075. #define MPI_BIOSPAGE1_IOCSET_SHIFT_INITIAL_SPINUP_DELAY (24)
  1076. #define MPI_BIOSPAGE1_IOCSET_MASK_PORT_ENABLE_DELAY (0x00F00000)
  1077. #define MPI_BIOSPAGE1_IOCSET_SHIFT_PORT_ENABLE_DELAY (20)
  1078. #define MPI_BIOSPAGE1_IOCSET_AUTO_PORT_ENABLE (0x00080000)
  1079. #define MPI_BIOSPAGE1_IOCSET_DIRECT_ATTACH_SPINUP_MODE (0x00040000)
  1080. #define MPI_BIOSPAGE1_IOCSET_MASK_BOOT_PREFERENCE (0x00030000)
  1081. #define MPI_BIOSPAGE1_IOCSET_ENCLOSURE_SLOT_BOOT (0x00000000)
  1082. #define MPI_BIOSPAGE1_IOCSET_SAS_ADDRESS_BOOT (0x00010000)
  1083. #define MPI_BIOSPAGE1_IOCSET_MASK_MAX_TARGET_SPIN_UP (0x0000F000)
  1084. #define MPI_BIOSPAGE1_IOCSET_SHIFT_MAX_TARGET_SPIN_UP (12)
  1085. #define MPI_BIOSPAGE1_IOCSET_MASK_SPINUP_DELAY (0x00000F00)
  1086. #define MPI_BIOSPAGE1_IOCSET_SHIFT_SPINUP_DELAY (8)
  1087. #define MPI_BIOSPAGE1_IOCSET_MASK_RM_SETTING (0x000000C0)
  1088. #define MPI_BIOSPAGE1_IOCSET_NONE_RM_SETTING (0x00000000)
  1089. #define MPI_BIOSPAGE1_IOCSET_BOOT_RM_SETTING (0x00000040)
  1090. #define MPI_BIOSPAGE1_IOCSET_MEDIA_RM_SETTING (0x00000080)
  1091. #define MPI_BIOSPAGE1_IOCSET_MASK_ADAPTER_SUPPORT (0x00000030)
  1092. #define MPI_BIOSPAGE1_IOCSET_NO_SUPPORT (0x00000000)
  1093. #define MPI_BIOSPAGE1_IOCSET_BIOS_SUPPORT (0x00000010)
  1094. #define MPI_BIOSPAGE1_IOCSET_OS_SUPPORT (0x00000020)
  1095. #define MPI_BIOSPAGE1_IOCSET_ALL_SUPPORT (0x00000030)
  1096. #define MPI_BIOSPAGE1_IOCSET_ALTERNATE_CHS (0x00000008)
  1097. /* values for the DeviceSettings field */
  1098. #define MPI_BIOSPAGE1_DEVSET_DISABLE_SMART_POLLING (0x00000010)
  1099. #define MPI_BIOSPAGE1_DEVSET_DISABLE_SEQ_LUN (0x00000008)
  1100. #define MPI_BIOSPAGE1_DEVSET_DISABLE_RM_LUN (0x00000004)
  1101. #define MPI_BIOSPAGE1_DEVSET_DISABLE_NON_RM_LUN (0x00000002)
  1102. #define MPI_BIOSPAGE1_DEVSET_DISABLE_OTHER_LUN (0x00000001)
  1103. /* defines for the ExpanderSpinup field */
  1104. #define MPI_BIOSPAGE1_EXPSPINUP_MASK_MAX_TARGET (0xF0)
  1105. #define MPI_BIOSPAGE1_EXPSPINUP_SHIFT_MAX_TARGET (4)
  1106. #define MPI_BIOSPAGE1_EXPSPINUP_MASK_DELAY (0x0F)
  1107. typedef struct _MPI_BOOT_DEVICE_ADAPTER_ORDER
  1108. {
  1109. U32 Reserved1; /* 00h */
  1110. U32 Reserved2; /* 04h */
  1111. U32 Reserved3; /* 08h */
  1112. U32 Reserved4; /* 0Ch */
  1113. U32 Reserved5; /* 10h */
  1114. U32 Reserved6; /* 14h */
  1115. U32 Reserved7; /* 18h */
  1116. U32 Reserved8; /* 1Ch */
  1117. U32 Reserved9; /* 20h */
  1118. U32 Reserved10; /* 24h */
  1119. U32 Reserved11; /* 28h */
  1120. U32 Reserved12; /* 2Ch */
  1121. U32 Reserved13; /* 30h */
  1122. U32 Reserved14; /* 34h */
  1123. U32 Reserved15; /* 38h */
  1124. U32 Reserved16; /* 3Ch */
  1125. U32 Reserved17; /* 40h */
  1126. } MPI_BOOT_DEVICE_ADAPTER_ORDER, MPI_POINTER PTR_MPI_BOOT_DEVICE_ADAPTER_ORDER;
  1127. typedef struct _MPI_BOOT_DEVICE_ADAPTER_NUMBER
  1128. {
  1129. U8 TargetID; /* 00h */
  1130. U8 Bus; /* 01h */
  1131. U8 AdapterNumber; /* 02h */
  1132. U8 Reserved1; /* 03h */
  1133. U32 Reserved2; /* 04h */
  1134. U32 Reserved3; /* 08h */
  1135. U32 Reserved4; /* 0Ch */
  1136. U8 LUN[8]; /* 10h */
  1137. U32 Reserved5; /* 18h */
  1138. U32 Reserved6; /* 1Ch */
  1139. U32 Reserved7; /* 20h */
  1140. U32 Reserved8; /* 24h */
  1141. U32 Reserved9; /* 28h */
  1142. U32 Reserved10; /* 2Ch */
  1143. U32 Reserved11; /* 30h */
  1144. U32 Reserved12; /* 34h */
  1145. U32 Reserved13; /* 38h */
  1146. U32 Reserved14; /* 3Ch */
  1147. U32 Reserved15; /* 40h */
  1148. } MPI_BOOT_DEVICE_ADAPTER_NUMBER, MPI_POINTER PTR_MPI_BOOT_DEVICE_ADAPTER_NUMBER;
  1149. typedef struct _MPI_BOOT_DEVICE_PCI_ADDRESS
  1150. {
  1151. U8 TargetID; /* 00h */
  1152. U8 Bus; /* 01h */
  1153. U16 PCIAddress; /* 02h */
  1154. U32 Reserved1; /* 04h */
  1155. U32 Reserved2; /* 08h */
  1156. U32 Reserved3; /* 0Ch */
  1157. U8 LUN[8]; /* 10h */
  1158. U32 Reserved4; /* 18h */
  1159. U32 Reserved5; /* 1Ch */
  1160. U32 Reserved6; /* 20h */
  1161. U32 Reserved7; /* 24h */
  1162. U32 Reserved8; /* 28h */
  1163. U32 Reserved9; /* 2Ch */
  1164. U32 Reserved10; /* 30h */
  1165. U32 Reserved11; /* 34h */
  1166. U32 Reserved12; /* 38h */
  1167. U32 Reserved13; /* 3Ch */
  1168. U32 Reserved14; /* 40h */
  1169. } MPI_BOOT_DEVICE_PCI_ADDRESS, MPI_POINTER PTR_MPI_BOOT_DEVICE_PCI_ADDRESS;
  1170. typedef struct _MPI_BOOT_DEVICE_SLOT_NUMBER
  1171. {
  1172. U8 TargetID; /* 00h */
  1173. U8 Bus; /* 01h */
  1174. U8 PCISlotNumber; /* 02h */
  1175. U8 Reserved1; /* 03h */
  1176. U32 Reserved2; /* 04h */
  1177. U32 Reserved3; /* 08h */
  1178. U32 Reserved4; /* 0Ch */
  1179. U8 LUN[8]; /* 10h */
  1180. U32 Reserved5; /* 18h */
  1181. U32 Reserved6; /* 1Ch */
  1182. U32 Reserved7; /* 20h */
  1183. U32 Reserved8; /* 24h */
  1184. U32 Reserved9; /* 28h */
  1185. U32 Reserved10; /* 2Ch */
  1186. U32 Reserved11; /* 30h */
  1187. U32 Reserved12; /* 34h */
  1188. U32 Reserved13; /* 38h */
  1189. U32 Reserved14; /* 3Ch */
  1190. U32 Reserved15; /* 40h */
  1191. } MPI_BOOT_DEVICE_PCI_SLOT_NUMBER, MPI_POINTER PTR_MPI_BOOT_DEVICE_PCI_SLOT_NUMBER;
  1192. typedef struct _MPI_BOOT_DEVICE_FC_WWN
  1193. {
  1194. U64 WWPN; /* 00h */
  1195. U32 Reserved1; /* 08h */
  1196. U32 Reserved2; /* 0Ch */
  1197. U8 LUN[8]; /* 10h */
  1198. U32 Reserved3; /* 18h */
  1199. U32 Reserved4; /* 1Ch */
  1200. U32 Reserved5; /* 20h */
  1201. U32 Reserved6; /* 24h */
  1202. U32 Reserved7; /* 28h */
  1203. U32 Reserved8; /* 2Ch */
  1204. U32 Reserved9; /* 30h */
  1205. U32 Reserved10; /* 34h */
  1206. U32 Reserved11; /* 38h */
  1207. U32 Reserved12; /* 3Ch */
  1208. U32 Reserved13; /* 40h */
  1209. } MPI_BOOT_DEVICE_FC_WWN, MPI_POINTER PTR_MPI_BOOT_DEVICE_FC_WWN;
  1210. typedef struct _MPI_BOOT_DEVICE_SAS_WWN
  1211. {
  1212. U64 SASAddress; /* 00h */
  1213. U32 Reserved1; /* 08h */
  1214. U32 Reserved2; /* 0Ch */
  1215. U8 LUN[8]; /* 10h */
  1216. U32 Reserved3; /* 18h */
  1217. U32 Reserved4; /* 1Ch */
  1218. U32 Reserved5; /* 20h */
  1219. U32 Reserved6; /* 24h */
  1220. U32 Reserved7; /* 28h */
  1221. U32 Reserved8; /* 2Ch */
  1222. U32 Reserved9; /* 30h */
  1223. U32 Reserved10; /* 34h */
  1224. U32 Reserved11; /* 38h */
  1225. U32 Reserved12; /* 3Ch */
  1226. U32 Reserved13; /* 40h */
  1227. } MPI_BOOT_DEVICE_SAS_WWN, MPI_POINTER PTR_MPI_BOOT_DEVICE_SAS_WWN;
  1228. typedef struct _MPI_BOOT_DEVICE_ENCLOSURE_SLOT
  1229. {
  1230. U64 EnclosureLogicalID; /* 00h */
  1231. U32 Reserved1; /* 08h */
  1232. U32 Reserved2; /* 0Ch */
  1233. U8 LUN[8]; /* 10h */
  1234. U16 SlotNumber; /* 18h */
  1235. U16 Reserved3; /* 1Ah */
  1236. U32 Reserved4; /* 1Ch */
  1237. U32 Reserved5; /* 20h */
  1238. U32 Reserved6; /* 24h */
  1239. U32 Reserved7; /* 28h */
  1240. U32 Reserved8; /* 2Ch */
  1241. U32 Reserved9; /* 30h */
  1242. U32 Reserved10; /* 34h */
  1243. U32 Reserved11; /* 38h */
  1244. U32 Reserved12; /* 3Ch */
  1245. U32 Reserved13; /* 40h */
  1246. } MPI_BOOT_DEVICE_ENCLOSURE_SLOT,
  1247. MPI_POINTER PTR_MPI_BOOT_DEVICE_ENCLOSURE_SLOT;
  1248. typedef union _MPI_BIOSPAGE2_BOOT_DEVICE
  1249. {
  1250. MPI_BOOT_DEVICE_ADAPTER_ORDER AdapterOrder;
  1251. MPI_BOOT_DEVICE_ADAPTER_NUMBER AdapterNumber;
  1252. MPI_BOOT_DEVICE_PCI_ADDRESS PCIAddress;
  1253. MPI_BOOT_DEVICE_PCI_SLOT_NUMBER PCISlotNumber;
  1254. MPI_BOOT_DEVICE_FC_WWN FcWwn;
  1255. MPI_BOOT_DEVICE_SAS_WWN SasWwn;
  1256. MPI_BOOT_DEVICE_ENCLOSURE_SLOT EnclosureSlot;
  1257. } MPI_BIOSPAGE2_BOOT_DEVICE, MPI_POINTER PTR_MPI_BIOSPAGE2_BOOT_DEVICE;
  1258. typedef struct _CONFIG_PAGE_BIOS_2
  1259. {
  1260. CONFIG_PAGE_HEADER Header; /* 00h */
  1261. U32 Reserved1; /* 04h */
  1262. U32 Reserved2; /* 08h */
  1263. U32 Reserved3; /* 0Ch */
  1264. U32 Reserved4; /* 10h */
  1265. U32 Reserved5; /* 14h */
  1266. U32 Reserved6; /* 18h */
  1267. U8 BootDeviceForm; /* 1Ch */
  1268. U8 PrevBootDeviceForm; /* 1Ch */
  1269. U16 Reserved8; /* 1Eh */
  1270. MPI_BIOSPAGE2_BOOT_DEVICE BootDevice; /* 20h */
  1271. } CONFIG_PAGE_BIOS_2, MPI_POINTER PTR_CONFIG_PAGE_BIOS_2,
  1272. BIOSPage2_t, MPI_POINTER pBIOSPage2_t;
  1273. #define MPI_BIOSPAGE2_PAGEVERSION (0x02)
  1274. #define MPI_BIOSPAGE2_FORM_MASK (0x0F)
  1275. #define MPI_BIOSPAGE2_FORM_ADAPTER_ORDER (0x00)
  1276. #define MPI_BIOSPAGE2_FORM_ADAPTER_NUMBER (0x01)
  1277. #define MPI_BIOSPAGE2_FORM_PCI_ADDRESS (0x02)
  1278. #define MPI_BIOSPAGE2_FORM_PCI_SLOT_NUMBER (0x03)
  1279. #define MPI_BIOSPAGE2_FORM_FC_WWN (0x04)
  1280. #define MPI_BIOSPAGE2_FORM_SAS_WWN (0x05)
  1281. #define MPI_BIOSPAGE2_FORM_ENCLOSURE_SLOT (0x06)
  1282. typedef struct _CONFIG_PAGE_BIOS_4
  1283. {
  1284. CONFIG_PAGE_HEADER Header; /* 00h */
  1285. U64 ReassignmentBaseWWID; /* 04h */
  1286. } CONFIG_PAGE_BIOS_4, MPI_POINTER PTR_CONFIG_PAGE_BIOS_4,
  1287. BIOSPage4_t, MPI_POINTER pBIOSPage4_t;
  1288. #define MPI_BIOSPAGE4_PAGEVERSION (0x00)
  1289. /****************************************************************************
  1290. * SCSI Port Config Pages
  1291. ****************************************************************************/
  1292. typedef struct _CONFIG_PAGE_SCSI_PORT_0
  1293. {
  1294. CONFIG_PAGE_HEADER Header; /* 00h */
  1295. U32 Capabilities; /* 04h */
  1296. U32 PhysicalInterface; /* 08h */
  1297. } CONFIG_PAGE_SCSI_PORT_0, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_0,
  1298. SCSIPortPage0_t, MPI_POINTER pSCSIPortPage0_t;
  1299. #define MPI_SCSIPORTPAGE0_PAGEVERSION (0x02)
  1300. #define MPI_SCSIPORTPAGE0_CAP_IU (0x00000001)
  1301. #define MPI_SCSIPORTPAGE0_CAP_DT (0x00000002)
  1302. #define MPI_SCSIPORTPAGE0_CAP_QAS (0x00000004)
  1303. #define MPI_SCSIPORTPAGE0_CAP_MIN_SYNC_PERIOD_MASK (0x0000FF00)
  1304. #define MPI_SCSIPORTPAGE0_SYNC_ASYNC (0x00)
  1305. #define MPI_SCSIPORTPAGE0_SYNC_5 (0x32)
  1306. #define MPI_SCSIPORTPAGE0_SYNC_10 (0x19)
  1307. #define MPI_SCSIPORTPAGE0_SYNC_20 (0x0C)
  1308. #define MPI_SCSIPORTPAGE0_SYNC_33_33 (0x0B)
  1309. #define MPI_SCSIPORTPAGE0_SYNC_40 (0x0A)
  1310. #define MPI_SCSIPORTPAGE0_SYNC_80 (0x09)
  1311. #define MPI_SCSIPORTPAGE0_SYNC_160 (0x08)
  1312. #define MPI_SCSIPORTPAGE0_SYNC_UNKNOWN (0xFF)
  1313. #define MPI_SCSIPORTPAGE0_CAP_SHIFT_MIN_SYNC_PERIOD (8)
  1314. #define MPI_SCSIPORTPAGE0_CAP_GET_MIN_SYNC_PERIOD(Cap) \
  1315. ( ((Cap) & MPI_SCSIPORTPAGE0_CAP_MIN_SYNC_PERIOD_MASK) \
  1316. >> MPI_SCSIPORTPAGE0_CAP_SHIFT_MIN_SYNC_PERIOD \
  1317. )
  1318. #define MPI_SCSIPORTPAGE0_CAP_MAX_SYNC_OFFSET_MASK (0x00FF0000)
  1319. #define MPI_SCSIPORTPAGE0_CAP_SHIFT_MAX_SYNC_OFFSET (16)
  1320. #define MPI_SCSIPORTPAGE0_CAP_GET_MAX_SYNC_OFFSET(Cap) \
  1321. ( ((Cap) & MPI_SCSIPORTPAGE0_CAP_MAX_SYNC_OFFSET_MASK) \
  1322. >> MPI_SCSIPORTPAGE0_CAP_SHIFT_MAX_SYNC_OFFSET \
  1323. )
  1324. #define MPI_SCSIPORTPAGE0_CAP_IDP (0x08000000)
  1325. #define MPI_SCSIPORTPAGE0_CAP_WIDE (0x20000000)
  1326. #define MPI_SCSIPORTPAGE0_CAP_AIP (0x80000000)
  1327. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_TYPE_MASK (0x00000003)
  1328. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_HVD (0x01)
  1329. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_SE (0x02)
  1330. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_LVD (0x03)
  1331. #define MPI_SCSIPORTPAGE0_PHY_MASK_CONNECTED_ID (0xFF000000)
  1332. #define MPI_SCSIPORTPAGE0_PHY_SHIFT_CONNECTED_ID (24)
  1333. #define MPI_SCSIPORTPAGE0_PHY_BUS_FREE_CONNECTED_ID (0xFE)
  1334. #define MPI_SCSIPORTPAGE0_PHY_UNKNOWN_CONNECTED_ID (0xFF)
  1335. typedef struct _CONFIG_PAGE_SCSI_PORT_1
  1336. {
  1337. CONFIG_PAGE_HEADER Header; /* 00h */
  1338. U32 Configuration; /* 04h */
  1339. U32 OnBusTimerValue; /* 08h */
  1340. U8 TargetConfig; /* 0Ch */
  1341. U8 Reserved1; /* 0Dh */
  1342. U16 IDConfig; /* 0Eh */
  1343. } CONFIG_PAGE_SCSI_PORT_1, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_1,
  1344. SCSIPortPage1_t, MPI_POINTER pSCSIPortPage1_t;
  1345. #define MPI_SCSIPORTPAGE1_PAGEVERSION (0x03)
  1346. /* Configuration values */
  1347. #define MPI_SCSIPORTPAGE1_CFG_PORT_SCSI_ID_MASK (0x000000FF)
  1348. #define MPI_SCSIPORTPAGE1_CFG_PORT_RESPONSE_ID_MASK (0xFFFF0000)
  1349. #define MPI_SCSIPORTPAGE1_CFG_SHIFT_PORT_RESPONSE_ID (16)
  1350. /* TargetConfig values */
  1351. #define MPI_SCSIPORTPAGE1_TARGCONFIG_TARG_ONLY (0x01)
  1352. #define MPI_SCSIPORTPAGE1_TARGCONFIG_INIT_TARG (0x02)
  1353. typedef struct _MPI_DEVICE_INFO
  1354. {
  1355. U8 Timeout; /* 00h */
  1356. U8 SyncFactor; /* 01h */
  1357. U16 DeviceFlags; /* 02h */
  1358. } MPI_DEVICE_INFO, MPI_POINTER PTR_MPI_DEVICE_INFO,
  1359. MpiDeviceInfo_t, MPI_POINTER pMpiDeviceInfo_t;
  1360. typedef struct _CONFIG_PAGE_SCSI_PORT_2
  1361. {
  1362. CONFIG_PAGE_HEADER Header; /* 00h */
  1363. U32 PortFlags; /* 04h */
  1364. U32 PortSettings; /* 08h */
  1365. MPI_DEVICE_INFO DeviceSettings[16]; /* 0Ch */
  1366. } CONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_2,
  1367. SCSIPortPage2_t, MPI_POINTER pSCSIPortPage2_t;
  1368. #define MPI_SCSIPORTPAGE2_PAGEVERSION (0x02)
  1369. /* PortFlags values */
  1370. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_SCAN_HIGH_TO_LOW (0x00000001)
  1371. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_AVOID_SCSI_RESET (0x00000004)
  1372. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_ALTERNATE_CHS (0x00000008)
  1373. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_TERMINATION_DISABLE (0x00000010)
  1374. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_DV_MASK (0x00000060)
  1375. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_FULL_DV (0x00000000)
  1376. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY (0x00000020)
  1377. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV (0x00000060)
  1378. /* PortSettings values */
  1379. #define MPI_SCSIPORTPAGE2_PORT_HOST_ID_MASK (0x0000000F)
  1380. #define MPI_SCSIPORTPAGE2_PORT_MASK_INIT_HBA (0x00000030)
  1381. #define MPI_SCSIPORTPAGE2_PORT_DISABLE_INIT_HBA (0x00000000)
  1382. #define MPI_SCSIPORTPAGE2_PORT_BIOS_INIT_HBA (0x00000010)
  1383. #define MPI_SCSIPORTPAGE2_PORT_OS_INIT_HBA (0x00000020)
  1384. #define MPI_SCSIPORTPAGE2_PORT_BIOS_OS_INIT_HBA (0x00000030)
  1385. #define MPI_SCSIPORTPAGE2_PORT_REMOVABLE_MEDIA (0x000000C0)
  1386. #define MPI_SCSIPORTPAGE2_PORT_RM_NONE (0x00000000)
  1387. #define MPI_SCSIPORTPAGE2_PORT_RM_BOOT_ONLY (0x00000040)
  1388. #define MPI_SCSIPORTPAGE2_PORT_RM_WITH_MEDIA (0x00000080)
  1389. #define MPI_SCSIPORTPAGE2_PORT_SPINUP_DELAY_MASK (0x00000F00)
  1390. #define MPI_SCSIPORTPAGE2_PORT_SHIFT_SPINUP_DELAY (8)
  1391. #define MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS (0x00003000)
  1392. #define MPI_SCSIPORTPAGE2_PORT_NEGO_MASTER_SETTINGS (0x00000000)
  1393. #define MPI_SCSIPORTPAGE2_PORT_NONE_MASTER_SETTINGS (0x00001000)
  1394. #define MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS (0x00003000)
  1395. #define MPI_SCSIPORTPAGE2_DEVICE_DISCONNECT_ENABLE (0x0001)
  1396. #define MPI_SCSIPORTPAGE2_DEVICE_ID_SCAN_ENABLE (0x0002)
  1397. #define MPI_SCSIPORTPAGE2_DEVICE_LUN_SCAN_ENABLE (0x0004)
  1398. #define MPI_SCSIPORTPAGE2_DEVICE_TAG_QUEUE_ENABLE (0x0008)
  1399. #define MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE (0x0010)
  1400. #define MPI_SCSIPORTPAGE2_DEVICE_BOOT_CHOICE (0x0020)
  1401. /****************************************************************************
  1402. * SCSI Target Device Config Pages
  1403. ****************************************************************************/
  1404. typedef struct _CONFIG_PAGE_SCSI_DEVICE_0
  1405. {
  1406. CONFIG_PAGE_HEADER Header; /* 00h */
  1407. U32 NegotiatedParameters; /* 04h */
  1408. U32 Information; /* 08h */
  1409. } CONFIG_PAGE_SCSI_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_0,
  1410. SCSIDevicePage0_t, MPI_POINTER pSCSIDevicePage0_t;
  1411. #define MPI_SCSIDEVPAGE0_PAGEVERSION (0x04)
  1412. #define MPI_SCSIDEVPAGE0_NP_IU (0x00000001)
  1413. #define MPI_SCSIDEVPAGE0_NP_DT (0x00000002)
  1414. #define MPI_SCSIDEVPAGE0_NP_QAS (0x00000004)
  1415. #define MPI_SCSIDEVPAGE0_NP_HOLD_MCS (0x00000008)
  1416. #define MPI_SCSIDEVPAGE0_NP_WR_FLOW (0x00000010)
  1417. #define MPI_SCSIDEVPAGE0_NP_RD_STRM (0x00000020)
  1418. #define MPI_SCSIDEVPAGE0_NP_RTI (0x00000040)
  1419. #define MPI_SCSIDEVPAGE0_NP_PCOMP_EN (0x00000080)
  1420. #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK (0x0000FF00)
  1421. #define MPI_SCSIDEVPAGE0_NP_SHIFT_SYNC_PERIOD (8)
  1422. #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK (0x00FF0000)
  1423. #define MPI_SCSIDEVPAGE0_NP_SHIFT_SYNC_OFFSET (16)
  1424. #define MPI_SCSIDEVPAGE0_NP_IDP (0x08000000)
  1425. #define MPI_SCSIDEVPAGE0_NP_WIDE (0x20000000)
  1426. #define MPI_SCSIDEVPAGE0_NP_AIP (0x80000000)
  1427. #define MPI_SCSIDEVPAGE0_INFO_PARAMS_NEGOTIATED (0x00000001)
  1428. #define MPI_SCSIDEVPAGE0_INFO_SDTR_REJECTED (0x00000002)
  1429. #define MPI_SCSIDEVPAGE0_INFO_WDTR_REJECTED (0x00000004)
  1430. #define MPI_SCSIDEVPAGE0_INFO_PPR_REJECTED (0x00000008)
  1431. typedef struct _CONFIG_PAGE_SCSI_DEVICE_1
  1432. {
  1433. CONFIG_PAGE_HEADER Header; /* 00h */
  1434. U32 RequestedParameters; /* 04h */
  1435. U32 Reserved; /* 08h */
  1436. U32 Configuration; /* 0Ch */
  1437. } CONFIG_PAGE_SCSI_DEVICE_1, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_1,
  1438. SCSIDevicePage1_t, MPI_POINTER pSCSIDevicePage1_t;
  1439. #define MPI_SCSIDEVPAGE1_PAGEVERSION (0x05)
  1440. #define MPI_SCSIDEVPAGE1_RP_IU (0x00000001)
  1441. #define MPI_SCSIDEVPAGE1_RP_DT (0x00000002)
  1442. #define MPI_SCSIDEVPAGE1_RP_QAS (0x00000004)
  1443. #define MPI_SCSIDEVPAGE1_RP_HOLD_MCS (0x00000008)
  1444. #define MPI_SCSIDEVPAGE1_RP_WR_FLOW (0x00000010)
  1445. #define MPI_SCSIDEVPAGE1_RP_RD_STRM (0x00000020)
  1446. #define MPI_SCSIDEVPAGE1_RP_RTI (0x00000040)
  1447. #define MPI_SCSIDEVPAGE1_RP_PCOMP_EN (0x00000080)
  1448. #define MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK (0x0000FF00)
  1449. #define MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD (8)
  1450. #define MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK (0x00FF0000)
  1451. #define MPI_SCSIDEVPAGE1_RP_SHIFT_MAX_SYNC_OFFSET (16)
  1452. #define MPI_SCSIDEVPAGE1_RP_IDP (0x08000000)
  1453. #define MPI_SCSIDEVPAGE1_RP_WIDE (0x20000000)
  1454. #define MPI_SCSIDEVPAGE1_RP_AIP (0x80000000)
  1455. #define MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED (0x00000002)
  1456. #define MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED (0x00000004)
  1457. #define MPI_SCSIDEVPAGE1_CONF_EXTENDED_PARAMS_ENABLE (0x00000008)
  1458. #define MPI_SCSIDEVPAGE1_CONF_FORCE_PPR_MSG (0x00000010)
  1459. typedef struct _CONFIG_PAGE_SCSI_DEVICE_2
  1460. {
  1461. CONFIG_PAGE_HEADER Header; /* 00h */
  1462. U32 DomainValidation; /* 04h */
  1463. U32 ParityPipeSelect; /* 08h */
  1464. U32 DataPipeSelect; /* 0Ch */
  1465. } CONFIG_PAGE_SCSI_DEVICE_2, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_2,
  1466. SCSIDevicePage2_t, MPI_POINTER pSCSIDevicePage2_t;
  1467. #define MPI_SCSIDEVPAGE2_PAGEVERSION (0x01)
  1468. #define MPI_SCSIDEVPAGE2_DV_ISI_ENABLE (0x00000010)
  1469. #define MPI_SCSIDEVPAGE2_DV_SECONDARY_DRIVER_ENABLE (0x00000020)
  1470. #define MPI_SCSIDEVPAGE2_DV_SLEW_RATE_CTRL (0x00000380)
  1471. #define MPI_SCSIDEVPAGE2_DV_PRIM_DRIVE_STR_CTRL (0x00001C00)
  1472. #define MPI_SCSIDEVPAGE2_DV_SECOND_DRIVE_STR_CTRL (0x0000E000)
  1473. #define MPI_SCSIDEVPAGE2_DV_XCLKH_ST (0x10000000)
  1474. #define MPI_SCSIDEVPAGE2_DV_XCLKS_ST (0x20000000)
  1475. #define MPI_SCSIDEVPAGE2_DV_XCLKH_DT (0x40000000)
  1476. #define MPI_SCSIDEVPAGE2_DV_XCLKS_DT (0x80000000)
  1477. #define MPI_SCSIDEVPAGE2_PPS_PPS_MASK (0x00000003)
  1478. #define MPI_SCSIDEVPAGE2_DPS_BIT_0_PL_SELECT_MASK (0x00000003)
  1479. #define MPI_SCSIDEVPAGE2_DPS_BIT_1_PL_SELECT_MASK (0x0000000C)
  1480. #define MPI_SCSIDEVPAGE2_DPS_BIT_2_PL_SELECT_MASK (0x00000030)
  1481. #define MPI_SCSIDEVPAGE2_DPS_BIT_3_PL_SELECT_MASK (0x000000C0)
  1482. #define MPI_SCSIDEVPAGE2_DPS_BIT_4_PL_SELECT_MASK (0x00000300)
  1483. #define MPI_SCSIDEVPAGE2_DPS_BIT_5_PL_SELECT_MASK (0x00000C00)
  1484. #define MPI_SCSIDEVPAGE2_DPS_BIT_6_PL_SELECT_MASK (0x00003000)
  1485. #define MPI_SCSIDEVPAGE2_DPS_BIT_7_PL_SELECT_MASK (0x0000C000)
  1486. #define MPI_SCSIDEVPAGE2_DPS_BIT_8_PL_SELECT_MASK (0x00030000)
  1487. #define MPI_SCSIDEVPAGE2_DPS_BIT_9_PL_SELECT_MASK (0x000C0000)
  1488. #define MPI_SCSIDEVPAGE2_DPS_BIT_10_PL_SELECT_MASK (0x00300000)
  1489. #define MPI_SCSIDEVPAGE2_DPS_BIT_11_PL_SELECT_MASK (0x00C00000)
  1490. #define MPI_SCSIDEVPAGE2_DPS_BIT_12_PL_SELECT_MASK (0x03000000)
  1491. #define MPI_SCSIDEVPAGE2_DPS_BIT_13_PL_SELECT_MASK (0x0C000000)
  1492. #define MPI_SCSIDEVPAGE2_DPS_BIT_14_PL_SELECT_MASK (0x30000000)
  1493. #define MPI_SCSIDEVPAGE2_DPS_BIT_15_PL_SELECT_MASK (0xC0000000)
  1494. typedef struct _CONFIG_PAGE_SCSI_DEVICE_3
  1495. {
  1496. CONFIG_PAGE_HEADER Header; /* 00h */
  1497. U16 MsgRejectCount; /* 04h */
  1498. U16 PhaseErrorCount; /* 06h */
  1499. U16 ParityErrorCount; /* 08h */
  1500. U16 Reserved; /* 0Ah */
  1501. } CONFIG_PAGE_SCSI_DEVICE_3, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_3,
  1502. SCSIDevicePage3_t, MPI_POINTER pSCSIDevicePage3_t;
  1503. #define MPI_SCSIDEVPAGE3_PAGEVERSION (0x00)
  1504. #define MPI_SCSIDEVPAGE3_MAX_COUNTER (0xFFFE)
  1505. #define MPI_SCSIDEVPAGE3_UNSUPPORTED_COUNTER (0xFFFF)
  1506. /****************************************************************************
  1507. * FC Port Config Pages
  1508. ****************************************************************************/
  1509. typedef struct _CONFIG_PAGE_FC_PORT_0
  1510. {
  1511. CONFIG_PAGE_HEADER Header; /* 00h */
  1512. U32 Flags; /* 04h */
  1513. U8 MPIPortNumber; /* 08h */
  1514. U8 LinkType; /* 09h */
  1515. U8 PortState; /* 0Ah */
  1516. U8 Reserved; /* 0Bh */
  1517. U32 PortIdentifier; /* 0Ch */
  1518. U64 WWNN; /* 10h */
  1519. U64 WWPN; /* 18h */
  1520. U32 SupportedServiceClass; /* 20h */
  1521. U32 SupportedSpeeds; /* 24h */
  1522. U32 CurrentSpeed; /* 28h */
  1523. U32 MaxFrameSize; /* 2Ch */
  1524. U64 FabricWWNN; /* 30h */
  1525. U64 FabricWWPN; /* 38h */
  1526. U32 DiscoveredPortsCount; /* 40h */
  1527. U32 MaxInitiators; /* 44h */
  1528. U8 MaxAliasesSupported; /* 48h */
  1529. U8 MaxHardAliasesSupported; /* 49h */
  1530. U8 NumCurrentAliases; /* 4Ah */
  1531. U8 Reserved1; /* 4Bh */
  1532. } CONFIG_PAGE_FC_PORT_0, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_0,
  1533. FCPortPage0_t, MPI_POINTER pFCPortPage0_t;
  1534. #define MPI_FCPORTPAGE0_PAGEVERSION (0x02)
  1535. #define MPI_FCPORTPAGE0_FLAGS_PROT_MASK (0x0000000F)
  1536. #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_INIT (MPI_PORTFACTS_PROTOCOL_INITIATOR)
  1537. #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_TARG (MPI_PORTFACTS_PROTOCOL_TARGET)
  1538. #define MPI_FCPORTPAGE0_FLAGS_PROT_LAN (MPI_PORTFACTS_PROTOCOL_LAN)
  1539. #define MPI_FCPORTPAGE0_FLAGS_PROT_LOGBUSADDR (MPI_PORTFACTS_PROTOCOL_LOGBUSADDR)
  1540. #define MPI_FCPORTPAGE0_FLAGS_ALIAS_ALPA_SUPPORTED (0x00000010)
  1541. #define MPI_FCPORTPAGE0_FLAGS_ALIAS_WWN_SUPPORTED (0x00000020)
  1542. #define MPI_FCPORTPAGE0_FLAGS_FABRIC_WWN_VALID (0x00000040)
  1543. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK (0x00000F00)
  1544. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT (0x00000000)
  1545. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_POINT_TO_POINT (0x00000100)
  1546. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PRIVATE_LOOP (0x00000200)
  1547. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_FABRIC_DIRECT (0x00000400)
  1548. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PUBLIC_LOOP (0x00000800)
  1549. #define MPI_FCPORTPAGE0_LTYPE_RESERVED (0x00)
  1550. #define MPI_FCPORTPAGE0_LTYPE_OTHER (0x01)
  1551. #define MPI_FCPORTPAGE0_LTYPE_UNKNOWN (0x02)
  1552. #define MPI_FCPORTPAGE0_LTYPE_COPPER (0x03)
  1553. #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1300 (0x04)
  1554. #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1500 (0x05)
  1555. #define MPI_FCPORTPAGE0_LTYPE_50_LASER_MULTI (0x06)
  1556. #define MPI_FCPORTPAGE0_LTYPE_50_LED_MULTI (0x07)
  1557. #define MPI_FCPORTPAGE0_LTYPE_62_LASER_MULTI (0x08)
  1558. #define MPI_FCPORTPAGE0_LTYPE_62_LED_MULTI (0x09)
  1559. #define MPI_FCPORTPAGE0_LTYPE_MULTI_LONG_WAVE (0x0A)
  1560. #define MPI_FCPORTPAGE0_LTYPE_MULTI_SHORT_WAVE (0x0B)
  1561. #define MPI_FCPORTPAGE0_LTYPE_LASER_SHORT_WAVE (0x0C)
  1562. #define MPI_FCPORTPAGE0_LTYPE_LED_SHORT_WAVE (0x0D)
  1563. #define MPI_FCPORTPAGE0_LTYPE_1300_LONG_WAVE (0x0E)
  1564. #define MPI_FCPORTPAGE0_LTYPE_1500_LONG_WAVE (0x0F)
  1565. #define MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN (0x01) /*(SNIA)HBA_PORTSTATE_UNKNOWN 1 Unknown */
  1566. #define MPI_FCPORTPAGE0_PORTSTATE_ONLINE (0x02) /*(SNIA)HBA_PORTSTATE_ONLINE 2 Operational */
  1567. #define MPI_FCPORTPAGE0_PORTSTATE_OFFLINE (0x03) /*(SNIA)HBA_PORTSTATE_OFFLINE 3 User Offline */
  1568. #define MPI_FCPORTPAGE0_PORTSTATE_BYPASSED (0x04) /*(SNIA)HBA_PORTSTATE_BYPASSED 4 Bypassed */
  1569. #define MPI_FCPORTPAGE0_PORTSTATE_DIAGNOST (0x05) /*(SNIA)HBA_PORTSTATE_DIAGNOSTICS 5 In diagnostics mode */
  1570. #define MPI_FCPORTPAGE0_PORTSTATE_LINKDOWN (0x06) /*(SNIA)HBA_PORTSTATE_LINKDOWN 6 Link Down */
  1571. #define MPI_FCPORTPAGE0_PORTSTATE_ERROR (0x07) /*(SNIA)HBA_PORTSTATE_ERROR 7 Port Error */
  1572. #define MPI_FCPORTPAGE0_PORTSTATE_LOOPBACK (0x08) /*(SNIA)HBA_PORTSTATE_LOOPBACK 8 Loopback */
  1573. #define MPI_FCPORTPAGE0_SUPPORT_CLASS_1 (0x00000001)
  1574. #define MPI_FCPORTPAGE0_SUPPORT_CLASS_2 (0x00000002)
  1575. #define MPI_FCPORTPAGE0_SUPPORT_CLASS_3 (0x00000004)
  1576. #define MPI_FCPORTPAGE0_SUPPORT_SPEED_UKNOWN (0x00000000) /* (SNIA)HBA_PORTSPEED_UNKNOWN 0 Unknown - transceiver incapable of reporting */
  1577. #define MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED (0x00000001) /* (SNIA)HBA_PORTSPEED_1GBIT 1 1 GBit/sec */
  1578. #define MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED (0x00000002) /* (SNIA)HBA_PORTSPEED_2GBIT 2 2 GBit/sec */
  1579. #define MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED (0x00000004) /* (SNIA)HBA_PORTSPEED_10GBIT 4 10 GBit/sec */
  1580. #define MPI_FCPORTPAGE0_SUPPORT_4GBIT_SPEED (0x00000008) /* (SNIA)HBA_PORTSPEED_4GBIT 8 4 GBit/sec */
  1581. #define MPI_FCPORTPAGE0_CURRENT_SPEED_UKNOWN MPI_FCPORTPAGE0_SUPPORT_SPEED_UKNOWN
  1582. #define MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED
  1583. #define MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED
  1584. #define MPI_FCPORTPAGE0_CURRENT_SPEED_10GBIT MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED
  1585. #define MPI_FCPORTPAGE0_CURRENT_SPEED_4GBIT MPI_FCPORTPAGE0_SUPPORT_4GBIT_SPEED
  1586. #define MPI_FCPORTPAGE0_CURRENT_SPEED_NOT_NEGOTIATED (0x00008000) /* (SNIA)HBA_PORTSPEED_NOT_NEGOTIATED (1<<15) Speed not established */
  1587. typedef struct _CONFIG_PAGE_FC_PORT_1
  1588. {
  1589. CONFIG_PAGE_HEADER Header; /* 00h */
  1590. U32 Flags; /* 04h */
  1591. U64 NoSEEPROMWWNN; /* 08h */
  1592. U64 NoSEEPROMWWPN; /* 10h */
  1593. U8 HardALPA; /* 18h */
  1594. U8 LinkConfig; /* 19h */
  1595. U8 TopologyConfig; /* 1Ah */
  1596. U8 AltConnector; /* 1Bh */
  1597. U8 NumRequestedAliases; /* 1Ch */
  1598. U8 RR_TOV; /* 1Dh */
  1599. U8 InitiatorDeviceTimeout; /* 1Eh */
  1600. U8 InitiatorIoPendTimeout; /* 1Fh */
  1601. } CONFIG_PAGE_FC_PORT_1, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_1,
  1602. FCPortPage1_t, MPI_POINTER pFCPortPage1_t;
  1603. #define MPI_FCPORTPAGE1_PAGEVERSION (0x06)
  1604. #define MPI_FCPORTPAGE1_FLAGS_EXT_FCP_STATUS_EN (0x08000000)
  1605. #define MPI_FCPORTPAGE1_FLAGS_IMMEDIATE_ERROR_REPLY (0x04000000)
  1606. #define MPI_FCPORTPAGE1_FLAGS_FORCE_USE_NOSEEPROM_WWNS (0x02000000)
  1607. #define MPI_FCPORTPAGE1_FLAGS_VERBOSE_RESCAN_EVENTS (0x01000000)
  1608. #define MPI_FCPORTPAGE1_FLAGS_TARGET_MODE_OXID (0x00800000)
  1609. #define MPI_FCPORTPAGE1_FLAGS_PORT_OFFLINE (0x00400000)
  1610. #define MPI_FCPORTPAGE1_FLAGS_SOFT_ALPA_FALLBACK (0x00200000)
  1611. #define MPI_FCPORTPAGE1_FLAGS_TARGET_LARGE_CDB_ENABLE (0x00000080)
  1612. #define MPI_FCPORTPAGE1_FLAGS_MASK_RR_TOV_UNITS (0x00000070)
  1613. #define MPI_FCPORTPAGE1_FLAGS_SUPPRESS_PROT_REG (0x00000008)
  1614. #define MPI_FCPORTPAGE1_FLAGS_PLOGI_ON_LOGO (0x00000004)
  1615. #define MPI_FCPORTPAGE1_FLAGS_MAINTAIN_LOGINS (0x00000002)
  1616. #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_DID (0x00000001)
  1617. #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_WWN (0x00000000)
  1618. #define MPI_FCPORTPAGE1_FLAGS_PROT_MASK (0xF0000000)
  1619. #define MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT (28)
  1620. #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT ((U32)MPI_PORTFACTS_PROTOCOL_INITIATOR << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  1621. #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_TARG ((U32)MPI_PORTFACTS_PROTOCOL_TARGET << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  1622. #define MPI_FCPORTPAGE1_FLAGS_PROT_LAN ((U32)MPI_PORTFACTS_PROTOCOL_LAN << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  1623. #define MPI_FCPORTPAGE1_FLAGS_PROT_LOGBUSADDR ((U32)MPI_PORTFACTS_PROTOCOL_LOGBUSADDR << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  1624. #define MPI_FCPORTPAGE1_FLAGS_NONE_RR_TOV_UNITS (0x00000000)
  1625. #define MPI_FCPORTPAGE1_FLAGS_THOUSANDTH_RR_TOV_UNITS (0x00000010)
  1626. #define MPI_FCPORTPAGE1_FLAGS_TENTH_RR_TOV_UNITS (0x00000030)
  1627. #define MPI_FCPORTPAGE1_FLAGS_TEN_RR_TOV_UNITS (0x00000050)
  1628. #define MPI_FCPORTPAGE1_HARD_ALPA_NOT_USED (0xFF)
  1629. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_MASK (0x0F)
  1630. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_1GIG (0x00)
  1631. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_2GIG (0x01)
  1632. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_4GIG (0x02)
  1633. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_10GIG (0x03)
  1634. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_AUTO (0x0F)
  1635. #define MPI_FCPORTPAGE1_TOPOLOGY_MASK (0x0F)
  1636. #define MPI_FCPORTPAGE1_TOPOLOGY_NLPORT (0x01)
  1637. #define MPI_FCPORTPAGE1_TOPOLOGY_NPORT (0x02)
  1638. #define MPI_FCPORTPAGE1_TOPOLOGY_AUTO (0x0F)
  1639. #define MPI_FCPORTPAGE1_ALT_CONN_UNKNOWN (0x00)
  1640. #define MPI_FCPORTPAGE1_INITIATOR_DEV_TIMEOUT_MASK (0x7F)
  1641. #define MPI_FCPORTPAGE1_INITIATOR_DEV_UNIT_16 (0x80)
  1642. typedef struct _CONFIG_PAGE_FC_PORT_2
  1643. {
  1644. CONFIG_PAGE_HEADER Header; /* 00h */
  1645. U8 NumberActive; /* 04h */
  1646. U8 ALPA[127]; /* 05h */
  1647. } CONFIG_PAGE_FC_PORT_2, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_2,
  1648. FCPortPage2_t, MPI_POINTER pFCPortPage2_t;
  1649. #define MPI_FCPORTPAGE2_PAGEVERSION (0x01)
  1650. typedef struct _WWN_FORMAT
  1651. {
  1652. U64 WWNN; /* 00h */
  1653. U64 WWPN; /* 08h */
  1654. } WWN_FORMAT, MPI_POINTER PTR_WWN_FORMAT,
  1655. WWNFormat, MPI_POINTER pWWNFormat;
  1656. typedef union _FC_PORT_PERSISTENT_PHYSICAL_ID
  1657. {
  1658. WWN_FORMAT WWN;
  1659. U32 Did;
  1660. } FC_PORT_PERSISTENT_PHYSICAL_ID, MPI_POINTER PTR_FC_PORT_PERSISTENT_PHYSICAL_ID,
  1661. PersistentPhysicalId_t, MPI_POINTER pPersistentPhysicalId_t;
  1662. typedef struct _FC_PORT_PERSISTENT
  1663. {
  1664. FC_PORT_PERSISTENT_PHYSICAL_ID PhysicalIdentifier; /* 00h */
  1665. U8 TargetID; /* 10h */
  1666. U8 Bus; /* 11h */
  1667. U16 Flags; /* 12h */
  1668. } FC_PORT_PERSISTENT, MPI_POINTER PTR_FC_PORT_PERSISTENT,
  1669. PersistentData_t, MPI_POINTER pPersistentData_t;
  1670. #define MPI_PERSISTENT_FLAGS_SHIFT (16)
  1671. #define MPI_PERSISTENT_FLAGS_ENTRY_VALID (0x0001)
  1672. #define MPI_PERSISTENT_FLAGS_SCAN_ID (0x0002)
  1673. #define MPI_PERSISTENT_FLAGS_SCAN_LUNS (0x0004)
  1674. #define MPI_PERSISTENT_FLAGS_BOOT_DEVICE (0x0008)
  1675. #define MPI_PERSISTENT_FLAGS_BY_DID (0x0080)
  1676. /*
  1677. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1678. * one and check Header.PageLength at runtime.
  1679. */
  1680. #ifndef MPI_FC_PORT_PAGE_3_ENTRY_MAX
  1681. #define MPI_FC_PORT_PAGE_3_ENTRY_MAX (1)
  1682. #endif
  1683. typedef struct _CONFIG_PAGE_FC_PORT_3
  1684. {
  1685. CONFIG_PAGE_HEADER Header; /* 00h */
  1686. FC_PORT_PERSISTENT Entry[MPI_FC_PORT_PAGE_3_ENTRY_MAX]; /* 04h */
  1687. } CONFIG_PAGE_FC_PORT_3, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_3,
  1688. FCPortPage3_t, MPI_POINTER pFCPortPage3_t;
  1689. #define MPI_FCPORTPAGE3_PAGEVERSION (0x01)
  1690. typedef struct _CONFIG_PAGE_FC_PORT_4
  1691. {
  1692. CONFIG_PAGE_HEADER Header; /* 00h */
  1693. U32 PortFlags; /* 04h */
  1694. U32 PortSettings; /* 08h */
  1695. } CONFIG_PAGE_FC_PORT_4, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_4,
  1696. FCPortPage4_t, MPI_POINTER pFCPortPage4_t;
  1697. #define MPI_FCPORTPAGE4_PAGEVERSION (0x00)
  1698. #define MPI_FCPORTPAGE4_PORT_FLAGS_ALTERNATE_CHS (0x00000008)
  1699. #define MPI_FCPORTPAGE4_PORT_MASK_INIT_HBA (0x00000030)
  1700. #define MPI_FCPORTPAGE4_PORT_DISABLE_INIT_HBA (0x00000000)
  1701. #define MPI_FCPORTPAGE4_PORT_BIOS_INIT_HBA (0x00000010)
  1702. #define MPI_FCPORTPAGE4_PORT_OS_INIT_HBA (0x00000020)
  1703. #define MPI_FCPORTPAGE4_PORT_BIOS_OS_INIT_HBA (0x00000030)
  1704. #define MPI_FCPORTPAGE4_PORT_REMOVABLE_MEDIA (0x000000C0)
  1705. #define MPI_FCPORTPAGE4_PORT_SPINUP_DELAY_MASK (0x00000F00)
  1706. typedef struct _CONFIG_PAGE_FC_PORT_5_ALIAS_INFO
  1707. {
  1708. U8 Flags; /* 00h */
  1709. U8 AliasAlpa; /* 01h */
  1710. U16 Reserved; /* 02h */
  1711. U64 AliasWWNN; /* 04h */
  1712. U64 AliasWWPN; /* 0Ch */
  1713. } CONFIG_PAGE_FC_PORT_5_ALIAS_INFO,
  1714. MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_5_ALIAS_INFO,
  1715. FcPortPage5AliasInfo_t, MPI_POINTER pFcPortPage5AliasInfo_t;
  1716. typedef struct _CONFIG_PAGE_FC_PORT_5
  1717. {
  1718. CONFIG_PAGE_HEADER Header; /* 00h */
  1719. CONFIG_PAGE_FC_PORT_5_ALIAS_INFO AliasInfo; /* 04h */
  1720. } CONFIG_PAGE_FC_PORT_5, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_5,
  1721. FCPortPage5_t, MPI_POINTER pFCPortPage5_t;
  1722. #define MPI_FCPORTPAGE5_PAGEVERSION (0x02)
  1723. #define MPI_FCPORTPAGE5_FLAGS_ALPA_ACQUIRED (0x01)
  1724. #define MPI_FCPORTPAGE5_FLAGS_HARD_ALPA (0x02)
  1725. #define MPI_FCPORTPAGE5_FLAGS_HARD_WWNN (0x04)
  1726. #define MPI_FCPORTPAGE5_FLAGS_HARD_WWPN (0x08)
  1727. #define MPI_FCPORTPAGE5_FLAGS_DISABLE (0x10)
  1728. typedef struct _CONFIG_PAGE_FC_PORT_6
  1729. {
  1730. CONFIG_PAGE_HEADER Header; /* 00h */
  1731. U32 Reserved; /* 04h */
  1732. U64 TimeSinceReset; /* 08h */
  1733. U64 TxFrames; /* 10h */
  1734. U64 RxFrames; /* 18h */
  1735. U64 TxWords; /* 20h */
  1736. U64 RxWords; /* 28h */
  1737. U64 LipCount; /* 30h */
  1738. U64 NosCount; /* 38h */
  1739. U64 ErrorFrames; /* 40h */
  1740. U64 DumpedFrames; /* 48h */
  1741. U64 LinkFailureCount; /* 50h */
  1742. U64 LossOfSyncCount; /* 58h */
  1743. U64 LossOfSignalCount; /* 60h */
  1744. U64 PrimativeSeqErrCount; /* 68h */
  1745. U64 InvalidTxWordCount; /* 70h */
  1746. U64 InvalidCrcCount; /* 78h */
  1747. U64 FcpInitiatorIoCount; /* 80h */
  1748. } CONFIG_PAGE_FC_PORT_6, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_6,
  1749. FCPortPage6_t, MPI_POINTER pFCPortPage6_t;
  1750. #define MPI_FCPORTPAGE6_PAGEVERSION (0x00)
  1751. typedef struct _CONFIG_PAGE_FC_PORT_7
  1752. {
  1753. CONFIG_PAGE_HEADER Header; /* 00h */
  1754. U32 Reserved; /* 04h */
  1755. U8 PortSymbolicName[256]; /* 08h */
  1756. } CONFIG_PAGE_FC_PORT_7, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_7,
  1757. FCPortPage7_t, MPI_POINTER pFCPortPage7_t;
  1758. #define MPI_FCPORTPAGE7_PAGEVERSION (0x00)
  1759. typedef struct _CONFIG_PAGE_FC_PORT_8
  1760. {
  1761. CONFIG_PAGE_HEADER Header; /* 00h */
  1762. U32 BitVector[8]; /* 04h */
  1763. } CONFIG_PAGE_FC_PORT_8, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_8,
  1764. FCPortPage8_t, MPI_POINTER pFCPortPage8_t;
  1765. #define MPI_FCPORTPAGE8_PAGEVERSION (0x00)
  1766. typedef struct _CONFIG_PAGE_FC_PORT_9
  1767. {
  1768. CONFIG_PAGE_HEADER Header; /* 00h */
  1769. U32 Reserved; /* 04h */
  1770. U64 GlobalWWPN; /* 08h */
  1771. U64 GlobalWWNN; /* 10h */
  1772. U32 UnitType; /* 18h */
  1773. U32 PhysicalPortNumber; /* 1Ch */
  1774. U32 NumAttachedNodes; /* 20h */
  1775. U16 IPVersion; /* 24h */
  1776. U16 UDPPortNumber; /* 26h */
  1777. U8 IPAddress[16]; /* 28h */
  1778. U16 Reserved1; /* 38h */
  1779. U16 TopologyDiscoveryFlags; /* 3Ah */
  1780. } CONFIG_PAGE_FC_PORT_9, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_9,
  1781. FCPortPage9_t, MPI_POINTER pFCPortPage9_t;
  1782. #define MPI_FCPORTPAGE9_PAGEVERSION (0x00)
  1783. typedef struct _CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA
  1784. {
  1785. U8 Id; /* 10h */
  1786. U8 ExtId; /* 11h */
  1787. U8 Connector; /* 12h */
  1788. U8 Transceiver[8]; /* 13h */
  1789. U8 Encoding; /* 1Bh */
  1790. U8 BitRate_100mbs; /* 1Ch */
  1791. U8 Reserved1; /* 1Dh */
  1792. U8 Length9u_km; /* 1Eh */
  1793. U8 Length9u_100m; /* 1Fh */
  1794. U8 Length50u_10m; /* 20h */
  1795. U8 Length62p5u_10m; /* 21h */
  1796. U8 LengthCopper_m; /* 22h */
  1797. U8 Reseverved2; /* 22h */
  1798. U8 VendorName[16]; /* 24h */
  1799. U8 Reserved3; /* 34h */
  1800. U8 VendorOUI[3]; /* 35h */
  1801. U8 VendorPN[16]; /* 38h */
  1802. U8 VendorRev[4]; /* 48h */
  1803. U16 Wavelength; /* 4Ch */
  1804. U8 Reserved4; /* 4Eh */
  1805. U8 CC_BASE; /* 4Fh */
  1806. } CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA,
  1807. MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA,
  1808. FCPortPage10BaseSfpData_t, MPI_POINTER pFCPortPage10BaseSfpData_t;
  1809. #define MPI_FCPORT10_BASE_ID_UNKNOWN (0x00)
  1810. #define MPI_FCPORT10_BASE_ID_GBIC (0x01)
  1811. #define MPI_FCPORT10_BASE_ID_FIXED (0x02)
  1812. #define MPI_FCPORT10_BASE_ID_SFP (0x03)
  1813. #define MPI_FCPORT10_BASE_ID_SFP_MIN (0x04)
  1814. #define MPI_FCPORT10_BASE_ID_SFP_MAX (0x7F)
  1815. #define MPI_FCPORT10_BASE_ID_VEND_SPEC_MASK (0x80)
  1816. #define MPI_FCPORT10_BASE_EXTID_UNKNOWN (0x00)
  1817. #define MPI_FCPORT10_BASE_EXTID_MODDEF1 (0x01)
  1818. #define MPI_FCPORT10_BASE_EXTID_MODDEF2 (0x02)
  1819. #define MPI_FCPORT10_BASE_EXTID_MODDEF3 (0x03)
  1820. #define MPI_FCPORT10_BASE_EXTID_SEEPROM (0x04)
  1821. #define MPI_FCPORT10_BASE_EXTID_MODDEF5 (0x05)
  1822. #define MPI_FCPORT10_BASE_EXTID_MODDEF6 (0x06)
  1823. #define MPI_FCPORT10_BASE_EXTID_MODDEF7 (0x07)
  1824. #define MPI_FCPORT10_BASE_EXTID_VNDSPC_MASK (0x80)
  1825. #define MPI_FCPORT10_BASE_CONN_UNKNOWN (0x00)
  1826. #define MPI_FCPORT10_BASE_CONN_SC (0x01)
  1827. #define MPI_FCPORT10_BASE_CONN_COPPER1 (0x02)
  1828. #define MPI_FCPORT10_BASE_CONN_COPPER2 (0x03)
  1829. #define MPI_FCPORT10_BASE_CONN_BNC_TNC (0x04)
  1830. #define MPI_FCPORT10_BASE_CONN_COAXIAL (0x05)
  1831. #define MPI_FCPORT10_BASE_CONN_FIBERJACK (0x06)
  1832. #define MPI_FCPORT10_BASE_CONN_LC (0x07)
  1833. #define MPI_FCPORT10_BASE_CONN_MT_RJ (0x08)
  1834. #define MPI_FCPORT10_BASE_CONN_MU (0x09)
  1835. #define MPI_FCPORT10_BASE_CONN_SG (0x0A)
  1836. #define MPI_FCPORT10_BASE_CONN_OPT_PIGT (0x0B)
  1837. #define MPI_FCPORT10_BASE_CONN_RSV1_MIN (0x0C)
  1838. #define MPI_FCPORT10_BASE_CONN_RSV1_MAX (0x1F)
  1839. #define MPI_FCPORT10_BASE_CONN_HSSDC_II (0x20)
  1840. #define MPI_FCPORT10_BASE_CONN_CPR_PIGT (0x21)
  1841. #define MPI_FCPORT10_BASE_CONN_RSV2_MIN (0x22)
  1842. #define MPI_FCPORT10_BASE_CONN_RSV2_MAX (0x7F)
  1843. #define MPI_FCPORT10_BASE_CONN_VNDSPC_MASK (0x80)
  1844. #define MPI_FCPORT10_BASE_ENCODE_UNSPEC (0x00)
  1845. #define MPI_FCPORT10_BASE_ENCODE_8B10B (0x01)
  1846. #define MPI_FCPORT10_BASE_ENCODE_4B5B (0x02)
  1847. #define MPI_FCPORT10_BASE_ENCODE_NRZ (0x03)
  1848. #define MPI_FCPORT10_BASE_ENCODE_MANCHESTER (0x04)
  1849. typedef struct _CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA
  1850. {
  1851. U8 Options[2]; /* 50h */
  1852. U8 BitRateMax; /* 52h */
  1853. U8 BitRateMin; /* 53h */
  1854. U8 VendorSN[16]; /* 54h */
  1855. U8 DateCode[8]; /* 64h */
  1856. U8 DiagMonitoringType; /* 6Ch */
  1857. U8 EnhancedOptions; /* 6Dh */
  1858. U8 SFF8472Compliance; /* 6Eh */
  1859. U8 CC_EXT; /* 6Fh */
  1860. } CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA,
  1861. MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA,
  1862. FCPortPage10ExtendedSfpData_t, MPI_POINTER pFCPortPage10ExtendedSfpData_t;
  1863. #define MPI_FCPORT10_EXT_OPTION1_RATESEL (0x20)
  1864. #define MPI_FCPORT10_EXT_OPTION1_TX_DISABLE (0x10)
  1865. #define MPI_FCPORT10_EXT_OPTION1_TX_FAULT (0x08)
  1866. #define MPI_FCPORT10_EXT_OPTION1_LOS_INVERT (0x04)
  1867. #define MPI_FCPORT10_EXT_OPTION1_LOS (0x02)
  1868. typedef struct _CONFIG_PAGE_FC_PORT_10
  1869. {
  1870. CONFIG_PAGE_HEADER Header; /* 00h */
  1871. U8 Flags; /* 04h */
  1872. U8 Reserved1; /* 05h */
  1873. U16 Reserved2; /* 06h */
  1874. U32 HwConfig1; /* 08h */
  1875. U32 HwConfig2; /* 0Ch */
  1876. CONFIG_PAGE_FC_PORT_10_BASE_SFP_DATA Base; /* 10h */
  1877. CONFIG_PAGE_FC_PORT_10_EXTENDED_SFP_DATA Extended; /* 50h */
  1878. U8 VendorSpecific[32]; /* 70h */
  1879. } CONFIG_PAGE_FC_PORT_10, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_10,
  1880. FCPortPage10_t, MPI_POINTER pFCPortPage10_t;
  1881. #define MPI_FCPORTPAGE10_PAGEVERSION (0x01)
  1882. /* standard MODDEF pin definitions (from GBIC spec.) */
  1883. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_MASK (0x00000007)
  1884. #define MPI_FCPORTPAGE10_FLAGS_MODDEF2 (0x00000001)
  1885. #define MPI_FCPORTPAGE10_FLAGS_MODDEF1 (0x00000002)
  1886. #define MPI_FCPORTPAGE10_FLAGS_MODDEF0 (0x00000004)
  1887. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_NOGBIC (0x00000007)
  1888. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_CPR_IEEE_CX (0x00000006)
  1889. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_COPPER (0x00000005)
  1890. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_OPTICAL_LW (0x00000004)
  1891. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_SEEPROM (0x00000003)
  1892. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_SW_OPTICAL (0x00000002)
  1893. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_LX_IEEE_OPT_LW (0x00000001)
  1894. #define MPI_FCPORTPAGE10_FLAGS_MODDEF_SX_IEEE_OPT_SW (0x00000000)
  1895. #define MPI_FCPORTPAGE10_FLAGS_CC_BASE_OK (0x00000010)
  1896. #define MPI_FCPORTPAGE10_FLAGS_CC_EXT_OK (0x00000020)
  1897. /****************************************************************************
  1898. * FC Device Config Pages
  1899. ****************************************************************************/
  1900. typedef struct _CONFIG_PAGE_FC_DEVICE_0
  1901. {
  1902. CONFIG_PAGE_HEADER Header; /* 00h */
  1903. U64 WWNN; /* 04h */
  1904. U64 WWPN; /* 0Ch */
  1905. U32 PortIdentifier; /* 14h */
  1906. U8 Protocol; /* 18h */
  1907. U8 Flags; /* 19h */
  1908. U16 BBCredit; /* 1Ah */
  1909. U16 MaxRxFrameSize; /* 1Ch */
  1910. U8 ADISCHardALPA; /* 1Eh */
  1911. U8 PortNumber; /* 1Fh */
  1912. U8 FcPhLowestVersion; /* 20h */
  1913. U8 FcPhHighestVersion; /* 21h */
  1914. U8 CurrentTargetID; /* 22h */
  1915. U8 CurrentBus; /* 23h */
  1916. } CONFIG_PAGE_FC_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_FC_DEVICE_0,
  1917. FCDevicePage0_t, MPI_POINTER pFCDevicePage0_t;
  1918. #define MPI_FC_DEVICE_PAGE0_PAGEVERSION (0x03)
  1919. #define MPI_FC_DEVICE_PAGE0_FLAGS_TARGETID_BUS_VALID (0x01)
  1920. #define MPI_FC_DEVICE_PAGE0_FLAGS_PLOGI_INVALID (0x02)
  1921. #define MPI_FC_DEVICE_PAGE0_FLAGS_PRLI_INVALID (0x04)
  1922. #define MPI_FC_DEVICE_PAGE0_PROT_IP (0x01)
  1923. #define MPI_FC_DEVICE_PAGE0_PROT_FCP_TARGET (0x02)
  1924. #define MPI_FC_DEVICE_PAGE0_PROT_FCP_INITIATOR (0x04)
  1925. #define MPI_FC_DEVICE_PAGE0_PROT_FCP_RETRY (0x08)
  1926. #define MPI_FC_DEVICE_PAGE0_PGAD_PORT_MASK (MPI_FC_DEVICE_PGAD_PORT_MASK)
  1927. #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_MASK (MPI_FC_DEVICE_PGAD_FORM_MASK)
  1928. #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_NEXT_DID (MPI_FC_DEVICE_PGAD_FORM_NEXT_DID)
  1929. #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_BUS_TID (MPI_FC_DEVICE_PGAD_FORM_BUS_TID)
  1930. #define MPI_FC_DEVICE_PAGE0_PGAD_DID_MASK (MPI_FC_DEVICE_PGAD_ND_DID_MASK)
  1931. #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_MASK (MPI_FC_DEVICE_PGAD_BT_BUS_MASK)
  1932. #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_SHIFT (MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT)
  1933. #define MPI_FC_DEVICE_PAGE0_PGAD_TID_MASK (MPI_FC_DEVICE_PGAD_BT_TID_MASK)
  1934. #define MPI_FC_DEVICE_PAGE0_HARD_ALPA_UNKNOWN (0xFF)
  1935. /****************************************************************************
  1936. * RAID Volume Config Pages
  1937. ****************************************************************************/
  1938. typedef struct _RAID_VOL0_PHYS_DISK
  1939. {
  1940. U16 Reserved; /* 00h */
  1941. U8 PhysDiskMap; /* 02h */
  1942. U8 PhysDiskNum; /* 03h */
  1943. } RAID_VOL0_PHYS_DISK, MPI_POINTER PTR_RAID_VOL0_PHYS_DISK,
  1944. RaidVol0PhysDisk_t, MPI_POINTER pRaidVol0PhysDisk_t;
  1945. #define MPI_RAIDVOL0_PHYSDISK_PRIMARY (0x01)
  1946. #define MPI_RAIDVOL0_PHYSDISK_SECONDARY (0x02)
  1947. typedef struct _RAID_VOL0_STATUS
  1948. {
  1949. U8 Flags; /* 00h */
  1950. U8 State; /* 01h */
  1951. U16 Reserved; /* 02h */
  1952. } RAID_VOL0_STATUS, MPI_POINTER PTR_RAID_VOL0_STATUS,
  1953. RaidVol0Status_t, MPI_POINTER pRaidVol0Status_t;
  1954. /* RAID Volume Page 0 VolumeStatus defines */
  1955. #define MPI_RAIDVOL0_STATUS_FLAG_ENABLED (0x01)
  1956. #define MPI_RAIDVOL0_STATUS_FLAG_QUIESCED (0x02)
  1957. #define MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS (0x04)
  1958. #define MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE (0x08)
  1959. #define MPI_RAIDVOL0_STATUS_FLAG_BAD_BLOCK_TABLE_FULL (0x10)
  1960. #define MPI_RAIDVOL0_STATUS_STATE_OPTIMAL (0x00)
  1961. #define MPI_RAIDVOL0_STATUS_STATE_DEGRADED (0x01)
  1962. #define MPI_RAIDVOL0_STATUS_STATE_FAILED (0x02)
  1963. #define MPI_RAIDVOL0_STATUS_STATE_MISSING (0x03)
  1964. typedef struct _RAID_VOL0_SETTINGS
  1965. {
  1966. U16 Settings; /* 00h */
  1967. U8 HotSparePool; /* 01h */ /* MPI_RAID_HOT_SPARE_POOL_ */
  1968. U8 Reserved; /* 02h */
  1969. } RAID_VOL0_SETTINGS, MPI_POINTER PTR_RAID_VOL0_SETTINGS,
  1970. RaidVol0Settings, MPI_POINTER pRaidVol0Settings;
  1971. /* RAID Volume Page 0 VolumeSettings defines */
  1972. #define MPI_RAIDVOL0_SETTING_WRITE_CACHING_ENABLE (0x0001)
  1973. #define MPI_RAIDVOL0_SETTING_OFFLINE_ON_SMART (0x0002)
  1974. #define MPI_RAIDVOL0_SETTING_AUTO_CONFIGURE (0x0004)
  1975. #define MPI_RAIDVOL0_SETTING_PRIORITY_RESYNC (0x0008)
  1976. #define MPI_RAIDVOL0_SETTING_FAST_DATA_SCRUBBING_0102 (0x0020) /* obsolete */
  1977. #define MPI_RAIDVOL0_SETTING_MASK_METADATA_SIZE (0x00C0)
  1978. #define MPI_RAIDVOL0_SETTING_64MB_METADATA_SIZE (0x0000)
  1979. #define MPI_RAIDVOL0_SETTING_512MB_METADATA_SIZE (0x0040)
  1980. #define MPI_RAIDVOL0_SETTING_USE_PRODUCT_ID_SUFFIX (0x0010)
  1981. #define MPI_RAIDVOL0_SETTING_USE_DEFAULTS (0x8000)
  1982. /* RAID Volume Page 0 HotSparePool defines, also used in RAID Physical Disk */
  1983. #define MPI_RAID_HOT_SPARE_POOL_0 (0x01)
  1984. #define MPI_RAID_HOT_SPARE_POOL_1 (0x02)
  1985. #define MPI_RAID_HOT_SPARE_POOL_2 (0x04)
  1986. #define MPI_RAID_HOT_SPARE_POOL_3 (0x08)
  1987. #define MPI_RAID_HOT_SPARE_POOL_4 (0x10)
  1988. #define MPI_RAID_HOT_SPARE_POOL_5 (0x20)
  1989. #define MPI_RAID_HOT_SPARE_POOL_6 (0x40)
  1990. #define MPI_RAID_HOT_SPARE_POOL_7 (0x80)
  1991. /*
  1992. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1993. * one and check Header.PageLength at runtime.
  1994. */
  1995. #ifndef MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX
  1996. #define MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX (1)
  1997. #endif
  1998. typedef struct _CONFIG_PAGE_RAID_VOL_0
  1999. {
  2000. CONFIG_PAGE_HEADER Header; /* 00h */
  2001. U8 VolumeID; /* 04h */
  2002. U8 VolumeBus; /* 05h */
  2003. U8 VolumeIOC; /* 06h */
  2004. U8 VolumeType; /* 07h */ /* MPI_RAID_VOL_TYPE_ */
  2005. RAID_VOL0_STATUS VolumeStatus; /* 08h */
  2006. RAID_VOL0_SETTINGS VolumeSettings; /* 0Ch */
  2007. U32 MaxLBA; /* 10h */
  2008. U32 MaxLBAHigh; /* 14h */
  2009. U32 StripeSize; /* 18h */
  2010. U32 Reserved2; /* 1Ch */
  2011. U32 Reserved3; /* 20h */
  2012. U8 NumPhysDisks; /* 24h */
  2013. U8 DataScrubRate; /* 25h */
  2014. U8 ResyncRate; /* 26h */
  2015. U8 InactiveStatus; /* 27h */
  2016. RAID_VOL0_PHYS_DISK PhysDisk[MPI_RAID_VOL_PAGE_0_PHYSDISK_MAX];/* 28h */
  2017. } CONFIG_PAGE_RAID_VOL_0, MPI_POINTER PTR_CONFIG_PAGE_RAID_VOL_0,
  2018. RaidVolumePage0_t, MPI_POINTER pRaidVolumePage0_t;
  2019. #define MPI_RAIDVOLPAGE0_PAGEVERSION (0x07)
  2020. /* values for RAID Volume Page 0 InactiveStatus field */
  2021. #define MPI_RAIDVOLPAGE0_UNKNOWN_INACTIVE (0x00)
  2022. #define MPI_RAIDVOLPAGE0_STALE_METADATA_INACTIVE (0x01)
  2023. #define MPI_RAIDVOLPAGE0_FOREIGN_VOLUME_INACTIVE (0x02)
  2024. #define MPI_RAIDVOLPAGE0_INSUFFICIENT_RESOURCE_INACTIVE (0x03)
  2025. #define MPI_RAIDVOLPAGE0_CLONE_VOLUME_INACTIVE (0x04)
  2026. #define MPI_RAIDVOLPAGE0_INSUFFICIENT_METADATA_INACTIVE (0x05)
  2027. #define MPI_RAIDVOLPAGE0_PREVIOUSLY_DELETED (0x06)
  2028. typedef struct _CONFIG_PAGE_RAID_VOL_1
  2029. {
  2030. CONFIG_PAGE_HEADER Header; /* 00h */
  2031. U8 VolumeID; /* 04h */
  2032. U8 VolumeBus; /* 05h */
  2033. U8 VolumeIOC; /* 06h */
  2034. U8 Reserved0; /* 07h */
  2035. U8 GUID[24]; /* 08h */
  2036. U8 Name[32]; /* 20h */
  2037. U64 WWID; /* 40h */
  2038. U32 Reserved1; /* 48h */
  2039. U32 Reserved2; /* 4Ch */
  2040. } CONFIG_PAGE_RAID_VOL_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_VOL_1,
  2041. RaidVolumePage1_t, MPI_POINTER pRaidVolumePage1_t;
  2042. #define MPI_RAIDVOLPAGE1_PAGEVERSION (0x01)
  2043. /****************************************************************************
  2044. * RAID Physical Disk Config Pages
  2045. ****************************************************************************/
  2046. typedef struct _RAID_PHYS_DISK0_ERROR_DATA
  2047. {
  2048. U8 ErrorCdbByte; /* 00h */
  2049. U8 ErrorSenseKey; /* 01h */
  2050. U16 Reserved; /* 02h */
  2051. U16 ErrorCount; /* 04h */
  2052. U8 ErrorASC; /* 06h */
  2053. U8 ErrorASCQ; /* 07h */
  2054. U16 SmartCount; /* 08h */
  2055. U8 SmartASC; /* 0Ah */
  2056. U8 SmartASCQ; /* 0Bh */
  2057. } RAID_PHYS_DISK0_ERROR_DATA, MPI_POINTER PTR_RAID_PHYS_DISK0_ERROR_DATA,
  2058. RaidPhysDisk0ErrorData_t, MPI_POINTER pRaidPhysDisk0ErrorData_t;
  2059. typedef struct _RAID_PHYS_DISK_INQUIRY_DATA
  2060. {
  2061. U8 VendorID[8]; /* 00h */
  2062. U8 ProductID[16]; /* 08h */
  2063. U8 ProductRevLevel[4]; /* 18h */
  2064. U8 Info[32]; /* 1Ch */
  2065. } RAID_PHYS_DISK0_INQUIRY_DATA, MPI_POINTER PTR_RAID_PHYS_DISK0_INQUIRY_DATA,
  2066. RaidPhysDisk0InquiryData, MPI_POINTER pRaidPhysDisk0InquiryData;
  2067. typedef struct _RAID_PHYS_DISK0_SETTINGS
  2068. {
  2069. U8 SepID; /* 00h */
  2070. U8 SepBus; /* 01h */
  2071. U8 HotSparePool; /* 02h */ /* MPI_RAID_HOT_SPARE_POOL_ */
  2072. U8 PhysDiskSettings; /* 03h */
  2073. } RAID_PHYS_DISK0_SETTINGS, MPI_POINTER PTR_RAID_PHYS_DISK0_SETTINGS,
  2074. RaidPhysDiskSettings_t, MPI_POINTER pRaidPhysDiskSettings_t;
  2075. typedef struct _RAID_PHYS_DISK0_STATUS
  2076. {
  2077. U8 Flags; /* 00h */
  2078. U8 State; /* 01h */
  2079. U16 Reserved; /* 02h */
  2080. } RAID_PHYS_DISK0_STATUS, MPI_POINTER PTR_RAID_PHYS_DISK0_STATUS,
  2081. RaidPhysDiskStatus_t, MPI_POINTER pRaidPhysDiskStatus_t;
  2082. /* RAID Physical Disk PhysDiskStatus flags */
  2083. #define MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC (0x01)
  2084. #define MPI_PHYSDISK0_STATUS_FLAG_QUIESCED (0x02)
  2085. #define MPI_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME (0x04)
  2086. #define MPI_PHYSDISK0_STATUS_FLAG_OPTIMAL_PREVIOUS (0x00)
  2087. #define MPI_PHYSDISK0_STATUS_FLAG_NOT_OPTIMAL_PREVIOUS (0x08)
  2088. #define MPI_PHYSDISK0_STATUS_ONLINE (0x00)
  2089. #define MPI_PHYSDISK0_STATUS_MISSING (0x01)
  2090. #define MPI_PHYSDISK0_STATUS_NOT_COMPATIBLE (0x02)
  2091. #define MPI_PHYSDISK0_STATUS_FAILED (0x03)
  2092. #define MPI_PHYSDISK0_STATUS_INITIALIZING (0x04)
  2093. #define MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED (0x05)
  2094. #define MPI_PHYSDISK0_STATUS_FAILED_REQUESTED (0x06)
  2095. #define MPI_PHYSDISK0_STATUS_OTHER_OFFLINE (0xFF)
  2096. typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_0
  2097. {
  2098. CONFIG_PAGE_HEADER Header; /* 00h */
  2099. U8 PhysDiskID; /* 04h */
  2100. U8 PhysDiskBus; /* 05h */
  2101. U8 PhysDiskIOC; /* 06h */
  2102. U8 PhysDiskNum; /* 07h */
  2103. RAID_PHYS_DISK0_SETTINGS PhysDiskSettings; /* 08h */
  2104. U32 Reserved1; /* 0Ch */
  2105. U8 ExtDiskIdentifier[8]; /* 10h */
  2106. U8 DiskIdentifier[16]; /* 18h */
  2107. RAID_PHYS_DISK0_INQUIRY_DATA InquiryData; /* 28h */
  2108. RAID_PHYS_DISK0_STATUS PhysDiskStatus; /* 64h */
  2109. U32 MaxLBA; /* 68h */
  2110. RAID_PHYS_DISK0_ERROR_DATA ErrorData; /* 6Ch */
  2111. } CONFIG_PAGE_RAID_PHYS_DISK_0, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_0,
  2112. RaidPhysDiskPage0_t, MPI_POINTER pRaidPhysDiskPage0_t;
  2113. #define MPI_RAIDPHYSDISKPAGE0_PAGEVERSION (0x02)
  2114. typedef struct _RAID_PHYS_DISK1_PATH
  2115. {
  2116. U8 PhysDiskID; /* 00h */
  2117. U8 PhysDiskBus; /* 01h */
  2118. U16 Reserved1; /* 02h */
  2119. U64 WWID; /* 04h */
  2120. U64 OwnerWWID; /* 0Ch */
  2121. U8 OwnerIdentifier; /* 14h */
  2122. U8 Reserved2; /* 15h */
  2123. U16 Flags; /* 16h */
  2124. } RAID_PHYS_DISK1_PATH, MPI_POINTER PTR_RAID_PHYS_DISK1_PATH,
  2125. RaidPhysDisk1Path_t, MPI_POINTER pRaidPhysDisk1Path_t;
  2126. /* RAID Physical Disk Page 1 Flags field defines */
  2127. #define MPI_RAID_PHYSDISK1_FLAG_BROKEN (0x0002)
  2128. #define MPI_RAID_PHYSDISK1_FLAG_INVALID (0x0001)
  2129. /*
  2130. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  2131. * one and check Header.PageLength or NumPhysDiskPaths at runtime.
  2132. */
  2133. #ifndef MPI_RAID_PHYS_DISK1_PATH_MAX
  2134. #define MPI_RAID_PHYS_DISK1_PATH_MAX (1)
  2135. #endif
  2136. typedef struct _CONFIG_PAGE_RAID_PHYS_DISK_1
  2137. {
  2138. CONFIG_PAGE_HEADER Header; /* 00h */
  2139. U8 NumPhysDiskPaths; /* 04h */
  2140. U8 PhysDiskNum; /* 05h */
  2141. U16 Reserved2; /* 06h */
  2142. U32 Reserved1; /* 08h */
  2143. RAID_PHYS_DISK1_PATH Path[MPI_RAID_PHYS_DISK1_PATH_MAX];/* 0Ch */
  2144. } CONFIG_PAGE_RAID_PHYS_DISK_1, MPI_POINTER PTR_CONFIG_PAGE_RAID_PHYS_DISK_1,
  2145. RaidPhysDiskPage1_t, MPI_POINTER pRaidPhysDiskPage1_t;
  2146. #define MPI_RAIDPHYSDISKPAGE1_PAGEVERSION (0x00)
  2147. /****************************************************************************
  2148. * LAN Config Pages
  2149. ****************************************************************************/
  2150. typedef struct _CONFIG_PAGE_LAN_0
  2151. {
  2152. ConfigPageHeader_t Header; /* 00h */
  2153. U16 TxRxModes; /* 04h */
  2154. U16 Reserved; /* 06h */
  2155. U32 PacketPrePad; /* 08h */
  2156. } CONFIG_PAGE_LAN_0, MPI_POINTER PTR_CONFIG_PAGE_LAN_0,
  2157. LANPage0_t, MPI_POINTER pLANPage0_t;
  2158. #define MPI_LAN_PAGE0_PAGEVERSION (0x01)
  2159. #define MPI_LAN_PAGE0_RETURN_LOOPBACK (0x0000)
  2160. #define MPI_LAN_PAGE0_SUPPRESS_LOOPBACK (0x0001)
  2161. #define MPI_LAN_PAGE0_LOOPBACK_MASK (0x0001)
  2162. typedef struct _CONFIG_PAGE_LAN_1
  2163. {
  2164. ConfigPageHeader_t Header; /* 00h */
  2165. U16 Reserved; /* 04h */
  2166. U8 CurrentDeviceState; /* 06h */
  2167. U8 Reserved1; /* 07h */
  2168. U32 MinPacketSize; /* 08h */
  2169. U32 MaxPacketSize; /* 0Ch */
  2170. U32 HardwareAddressLow; /* 10h */
  2171. U32 HardwareAddressHigh; /* 14h */
  2172. U32 MaxWireSpeedLow; /* 18h */
  2173. U32 MaxWireSpeedHigh; /* 1Ch */
  2174. U32 BucketsRemaining; /* 20h */
  2175. U32 MaxReplySize; /* 24h */
  2176. U32 NegWireSpeedLow; /* 28h */
  2177. U32 NegWireSpeedHigh; /* 2Ch */
  2178. } CONFIG_PAGE_LAN_1, MPI_POINTER PTR_CONFIG_PAGE_LAN_1,
  2179. LANPage1_t, MPI_POINTER pLANPage1_t;
  2180. #define MPI_LAN_PAGE1_PAGEVERSION (0x03)
  2181. #define MPI_LAN_PAGE1_DEV_STATE_RESET (0x00)
  2182. #define MPI_LAN_PAGE1_DEV_STATE_OPERATIONAL (0x01)
  2183. /****************************************************************************
  2184. * Inband Config Pages
  2185. ****************************************************************************/
  2186. typedef struct _CONFIG_PAGE_INBAND_0
  2187. {
  2188. CONFIG_PAGE_HEADER Header; /* 00h */
  2189. MPI_VERSION_FORMAT InbandVersion; /* 04h */
  2190. U16 MaximumBuffers; /* 08h */
  2191. U16 Reserved1; /* 0Ah */
  2192. } CONFIG_PAGE_INBAND_0, MPI_POINTER PTR_CONFIG_PAGE_INBAND_0,
  2193. InbandPage0_t, MPI_POINTER pInbandPage0_t;
  2194. #define MPI_INBAND_PAGEVERSION (0x00)
  2195. /****************************************************************************
  2196. * SAS IO Unit Config Pages
  2197. ****************************************************************************/
  2198. typedef struct _MPI_SAS_IO_UNIT0_PHY_DATA
  2199. {
  2200. U8 Port; /* 00h */
  2201. U8 PortFlags; /* 01h */
  2202. U8 PhyFlags; /* 02h */
  2203. U8 NegotiatedLinkRate; /* 03h */
  2204. U32 ControllerPhyDeviceInfo;/* 04h */
  2205. U16 AttachedDeviceHandle; /* 08h */
  2206. U16 ControllerDevHandle; /* 0Ah */
  2207. U32 DiscoveryStatus; /* 0Ch */
  2208. } MPI_SAS_IO_UNIT0_PHY_DATA, MPI_POINTER PTR_MPI_SAS_IO_UNIT0_PHY_DATA,
  2209. SasIOUnit0PhyData, MPI_POINTER pSasIOUnit0PhyData;
  2210. /*
  2211. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  2212. * one and check Header.PageLength at runtime.
  2213. */
  2214. #ifndef MPI_SAS_IOUNIT0_PHY_MAX
  2215. #define MPI_SAS_IOUNIT0_PHY_MAX (1)
  2216. #endif
  2217. typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0
  2218. {
  2219. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2220. U16 NvdataVersionDefault; /* 08h */
  2221. U16 NvdataVersionPersistent; /* 0Ah */
  2222. U8 NumPhys; /* 0Ch */
  2223. U8 Reserved2; /* 0Dh */
  2224. U16 Reserved3; /* 0Eh */
  2225. MPI_SAS_IO_UNIT0_PHY_DATA PhyData[MPI_SAS_IOUNIT0_PHY_MAX]; /* 10h */
  2226. } CONFIG_PAGE_SAS_IO_UNIT_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_0,
  2227. SasIOUnitPage0_t, MPI_POINTER pSasIOUnitPage0_t;
  2228. #define MPI_SASIOUNITPAGE0_PAGEVERSION (0x04)
  2229. /* values for SAS IO Unit Page 0 PortFlags */
  2230. #define MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS (0x08)
  2231. #define MPI_SAS_IOUNIT0_PORT_FLAGS_0_TARGET_IOC_NUM (0x00)
  2232. #define MPI_SAS_IOUNIT0_PORT_FLAGS_1_TARGET_IOC_NUM (0x04)
  2233. #define MPI_SAS_IOUNIT0_PORT_FLAGS_AUTO_PORT_CONFIG (0x01)
  2234. /* values for SAS IO Unit Page 0 PhyFlags */
  2235. #define MPI_SAS_IOUNIT0_PHY_FLAGS_PHY_DISABLED (0x04)
  2236. #define MPI_SAS_IOUNIT0_PHY_FLAGS_TX_INVERT (0x02)
  2237. #define MPI_SAS_IOUNIT0_PHY_FLAGS_RX_INVERT (0x01)
  2238. /* values for SAS IO Unit Page 0 NegotiatedLinkRate */
  2239. #define MPI_SAS_IOUNIT0_RATE_UNKNOWN (0x00)
  2240. #define MPI_SAS_IOUNIT0_RATE_PHY_DISABLED (0x01)
  2241. #define MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION (0x02)
  2242. #define MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE (0x03)
  2243. #define MPI_SAS_IOUNIT0_RATE_1_5 (0x08)
  2244. #define MPI_SAS_IOUNIT0_RATE_3_0 (0x09)
  2245. #define MPI_SAS_IOUNIT0_RATE_6_0 (0x0A)
  2246. /* see mpi_sas.h for values for SAS IO Unit Page 0 ControllerPhyDeviceInfo values */
  2247. /* values for SAS IO Unit Page 0 DiscoveryStatus */
  2248. #define MPI_SAS_IOUNIT0_DS_LOOP_DETECTED (0x00000001)
  2249. #define MPI_SAS_IOUNIT0_DS_UNADDRESSABLE_DEVICE (0x00000002)
  2250. #define MPI_SAS_IOUNIT0_DS_MULTIPLE_PORTS (0x00000004)
  2251. #define MPI_SAS_IOUNIT0_DS_EXPANDER_ERR (0x00000008)
  2252. #define MPI_SAS_IOUNIT0_DS_SMP_TIMEOUT (0x00000010)
  2253. #define MPI_SAS_IOUNIT0_DS_OUT_ROUTE_ENTRIES (0x00000020)
  2254. #define MPI_SAS_IOUNIT0_DS_INDEX_NOT_EXIST (0x00000040)
  2255. #define MPI_SAS_IOUNIT0_DS_SMP_FUNCTION_FAILED (0x00000080)
  2256. #define MPI_SAS_IOUNIT0_DS_SMP_CRC_ERROR (0x00000100)
  2257. #define MPI_SAS_IOUNIT0_DS_SUBTRACTIVE_LINK (0x00000200)
  2258. #define MPI_SAS_IOUNIT0_DS_TABLE_LINK (0x00000400)
  2259. #define MPI_SAS_IOUNIT0_DS_UNSUPPORTED_DEVICE (0x00000800)
  2260. #define MPI_SAS_IOUNIT0_DS_MAX_SATA_TARGETS (0x00001000)
  2261. #define MPI_SAS_IOUNIT0_DS_MULTI_PORT_DOMAIN (0x00002000)
  2262. typedef struct _MPI_SAS_IO_UNIT1_PHY_DATA
  2263. {
  2264. U8 Port; /* 00h */
  2265. U8 PortFlags; /* 01h */
  2266. U8 PhyFlags; /* 02h */
  2267. U8 MaxMinLinkRate; /* 03h */
  2268. U32 ControllerPhyDeviceInfo; /* 04h */
  2269. U16 MaxTargetPortConnectTime; /* 08h */
  2270. U16 Reserved1; /* 0Ah */
  2271. } MPI_SAS_IO_UNIT1_PHY_DATA, MPI_POINTER PTR_MPI_SAS_IO_UNIT1_PHY_DATA,
  2272. SasIOUnit1PhyData, MPI_POINTER pSasIOUnit1PhyData;
  2273. /*
  2274. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  2275. * one and check Header.PageLength at runtime.
  2276. */
  2277. #ifndef MPI_SAS_IOUNIT1_PHY_MAX
  2278. #define MPI_SAS_IOUNIT1_PHY_MAX (1)
  2279. #endif
  2280. typedef struct _CONFIG_PAGE_SAS_IO_UNIT_1
  2281. {
  2282. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2283. U16 ControlFlags; /* 08h */
  2284. U16 MaxNumSATATargets; /* 0Ah */
  2285. U16 AdditionalControlFlags; /* 0Ch */
  2286. U16 Reserved1; /* 0Eh */
  2287. U8 NumPhys; /* 10h */
  2288. U8 SATAMaxQDepth; /* 11h */
  2289. U8 ReportDeviceMissingDelay; /* 12h */
  2290. U8 IODeviceMissingDelay; /* 13h */
  2291. MPI_SAS_IO_UNIT1_PHY_DATA PhyData[MPI_SAS_IOUNIT1_PHY_MAX]; /* 14h */
  2292. } CONFIG_PAGE_SAS_IO_UNIT_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_1,
  2293. SasIOUnitPage1_t, MPI_POINTER pSasIOUnitPage1_t;
  2294. #define MPI_SASIOUNITPAGE1_PAGEVERSION (0x07)
  2295. /* values for SAS IO Unit Page 1 ControlFlags */
  2296. #define MPI_SAS_IOUNIT1_CONTROL_DEVICE_SELF_TEST (0x8000)
  2297. #define MPI_SAS_IOUNIT1_CONTROL_SATA_3_0_MAX (0x4000)
  2298. #define MPI_SAS_IOUNIT1_CONTROL_SATA_1_5_MAX (0x2000)
  2299. #define MPI_SAS_IOUNIT1_CONTROL_SATA_SW_PRESERVE (0x1000)
  2300. #define MPI_SAS_IOUNIT1_CONTROL_DISABLE_SAS_HASH (0x0800)
  2301. #define MPI_SAS_IOUNIT1_CONTROL_MASK_DEV_SUPPORT (0x0600)
  2302. #define MPI_SAS_IOUNIT1_CONTROL_SHIFT_DEV_SUPPORT (9)
  2303. #define MPI_SAS_IOUNIT1_CONTROL_DEV_SUPPORT_BOTH (0x00)
  2304. #define MPI_SAS_IOUNIT1_CONTROL_DEV_SAS_SUPPORT (0x01)
  2305. #define MPI_SAS_IOUNIT1_CONTROL_DEV_SATA_SUPPORT (0x02)
  2306. #define MPI_SAS_IOUNIT1_CONTROL_POSTPONE_SATA_INIT (0x0100)
  2307. #define MPI_SAS_IOUNIT1_CONTROL_SATA_48BIT_LBA_REQUIRED (0x0080)
  2308. #define MPI_SAS_IOUNIT1_CONTROL_SATA_SMART_REQUIRED (0x0040)
  2309. #define MPI_SAS_IOUNIT1_CONTROL_SATA_NCQ_REQUIRED (0x0020)
  2310. #define MPI_SAS_IOUNIT1_CONTROL_SATA_FUA_REQUIRED (0x0010)
  2311. #define MPI_SAS_IOUNIT1_CONTROL_PHY_ENABLE_ORDER_HIGH (0x0008)
  2312. #define MPI_SAS_IOUNIT1_CONTROL_SUBTRACTIVE_ILLEGAL (0x0004)
  2313. #define MPI_SAS_IOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY (0x0002)
  2314. #define MPI_SAS_IOUNIT1_CONTROL_CLEAR_AFFILIATION (0x0001)
  2315. /* values for SAS IO Unit Page 1 AdditionalControlFlags */
  2316. #define MPI_SAS_IOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL (0x0080)
  2317. #define MPI_SAS_IOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040)
  2318. #define MPI_SAS_IOUNIT1_ACONTROL_HIDE_NONZERO_ATTACHED_PHY_IDENT (0x0020)
  2319. #define MPI_SAS_IOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010)
  2320. #define MPI_SAS_IOUNIT1_ACONTROL_OTHER_AFFILIATION_SATA_LINK_RESET (0x0008)
  2321. #define MPI_SAS_IOUNIT1_ACONTROL_SELF_AFFILIATION_SATA_LINK_RESET (0x0004)
  2322. #define MPI_SAS_IOUNIT1_ACONTROL_NO_AFFILIATION_SATA_LINK_RESET (0x0002)
  2323. #define MPI_SAS_IOUNIT1_ACONTROL_ALLOW_TABLE_TO_TABLE (0x0001)
  2324. /* defines for SAS IO Unit Page 1 ReportDeviceMissingDelay */
  2325. #define MPI_SAS_IOUNIT1_REPORT_MISSING_TIMEOUT_MASK (0x7F)
  2326. #define MPI_SAS_IOUNIT1_REPORT_MISSING_UNIT_16 (0x80)
  2327. /* values for SAS IO Unit Page 1 PortFlags */
  2328. #define MPI_SAS_IOUNIT1_PORT_FLAGS_0_TARGET_IOC_NUM (0x00)
  2329. #define MPI_SAS_IOUNIT1_PORT_FLAGS_1_TARGET_IOC_NUM (0x04)
  2330. #define MPI_SAS_IOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG (0x01)
  2331. /* values for SAS IO Unit Page 0 PhyFlags */
  2332. #define MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE (0x04)
  2333. #define MPI_SAS_IOUNIT1_PHY_FLAGS_TX_INVERT (0x02)
  2334. #define MPI_SAS_IOUNIT1_PHY_FLAGS_RX_INVERT (0x01)
  2335. /* values for SAS IO Unit Page 0 MaxMinLinkRate */
  2336. #define MPI_SAS_IOUNIT1_MAX_RATE_MASK (0xF0)
  2337. #define MPI_SAS_IOUNIT1_MAX_RATE_1_5 (0x80)
  2338. #define MPI_SAS_IOUNIT1_MAX_RATE_3_0 (0x90)
  2339. #define MPI_SAS_IOUNIT1_MIN_RATE_MASK (0x0F)
  2340. #define MPI_SAS_IOUNIT1_MIN_RATE_1_5 (0x08)
  2341. #define MPI_SAS_IOUNIT1_MIN_RATE_3_0 (0x09)
  2342. /* see mpi_sas.h for values for SAS IO Unit Page 1 ControllerPhyDeviceInfo values */
  2343. typedef struct _CONFIG_PAGE_SAS_IO_UNIT_2
  2344. {
  2345. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2346. U8 NumDevsPerEnclosure; /* 08h */
  2347. U8 Reserved1; /* 09h */
  2348. U16 Reserved2; /* 0Ah */
  2349. U16 MaxPersistentIDs; /* 0Ch */
  2350. U16 NumPersistentIDsUsed; /* 0Eh */
  2351. U8 Status; /* 10h */
  2352. U8 Flags; /* 11h */
  2353. U16 MaxNumPhysicalMappedIDs;/* 12h */
  2354. } CONFIG_PAGE_SAS_IO_UNIT_2, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_2,
  2355. SasIOUnitPage2_t, MPI_POINTER pSasIOUnitPage2_t;
  2356. #define MPI_SASIOUNITPAGE2_PAGEVERSION (0x06)
  2357. /* values for SAS IO Unit Page 2 Status field */
  2358. #define MPI_SAS_IOUNIT2_STATUS_DEVICE_LIMIT_EXCEEDED (0x08)
  2359. #define MPI_SAS_IOUNIT2_STATUS_ENCLOSURE_DEVICES_UNMAPPED (0x04)
  2360. #define MPI_SAS_IOUNIT2_STATUS_DISABLED_PERSISTENT_MAPPINGS (0x02)
  2361. #define MPI_SAS_IOUNIT2_STATUS_FULL_PERSISTENT_MAPPINGS (0x01)
  2362. /* values for SAS IO Unit Page 2 Flags field */
  2363. #define MPI_SAS_IOUNIT2_FLAGS_DISABLE_PERSISTENT_MAPPINGS (0x01)
  2364. /* Physical Mapping Modes */
  2365. #define MPI_SAS_IOUNIT2_FLAGS_MASK_PHYS_MAP_MODE (0x0E)
  2366. #define MPI_SAS_IOUNIT2_FLAGS_SHIFT_PHYS_MAP_MODE (1)
  2367. #define MPI_SAS_IOUNIT2_FLAGS_NO_PHYS_MAP (0x00)
  2368. #define MPI_SAS_IOUNIT2_FLAGS_DIRECT_ATTACH_PHYS_MAP (0x01)
  2369. #define MPI_SAS_IOUNIT2_FLAGS_ENCLOSURE_SLOT_PHYS_MAP (0x02)
  2370. #define MPI_SAS_IOUNIT2_FLAGS_HOST_ASSIGNED_PHYS_MAP (0x07)
  2371. #define MPI_SAS_IOUNIT2_FLAGS_RESERVE_ID_0_FOR_BOOT (0x10)
  2372. #define MPI_SAS_IOUNIT2_FLAGS_DA_STARTING_SLOT (0x20)
  2373. typedef struct _CONFIG_PAGE_SAS_IO_UNIT_3
  2374. {
  2375. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2376. U32 Reserved1; /* 08h */
  2377. U32 MaxInvalidDwordCount; /* 0Ch */
  2378. U32 InvalidDwordCountTime; /* 10h */
  2379. U32 MaxRunningDisparityErrorCount; /* 14h */
  2380. U32 RunningDisparityErrorTime; /* 18h */
  2381. U32 MaxLossDwordSynchCount; /* 1Ch */
  2382. U32 LossDwordSynchCountTime; /* 20h */
  2383. U32 MaxPhyResetProblemCount; /* 24h */
  2384. U32 PhyResetProblemTime; /* 28h */
  2385. } CONFIG_PAGE_SAS_IO_UNIT_3, MPI_POINTER PTR_CONFIG_PAGE_SAS_IO_UNIT_3,
  2386. SasIOUnitPage3_t, MPI_POINTER pSasIOUnitPage3_t;
  2387. #define MPI_SASIOUNITPAGE3_PAGEVERSION (0x00)
  2388. /****************************************************************************
  2389. * SAS Expander Config Pages
  2390. ****************************************************************************/
  2391. typedef struct _CONFIG_PAGE_SAS_EXPANDER_0
  2392. {
  2393. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2394. U8 PhysicalPort; /* 08h */
  2395. U8 Reserved1; /* 09h */
  2396. U16 EnclosureHandle; /* 0Ah */
  2397. U64 SASAddress; /* 0Ch */
  2398. U32 DiscoveryStatus; /* 14h */
  2399. U16 DevHandle; /* 18h */
  2400. U16 ParentDevHandle; /* 1Ah */
  2401. U16 ExpanderChangeCount; /* 1Ch */
  2402. U16 ExpanderRouteIndexes; /* 1Eh */
  2403. U8 NumPhys; /* 20h */
  2404. U8 SASLevel; /* 21h */
  2405. U8 Flags; /* 22h */
  2406. U8 Reserved3; /* 23h */
  2407. } CONFIG_PAGE_SAS_EXPANDER_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_EXPANDER_0,
  2408. SasExpanderPage0_t, MPI_POINTER pSasExpanderPage0_t;
  2409. #define MPI_SASEXPANDER0_PAGEVERSION (0x03)
  2410. /* values for SAS Expander Page 0 DiscoveryStatus field */
  2411. #define MPI_SAS_EXPANDER0_DS_LOOP_DETECTED (0x00000001)
  2412. #define MPI_SAS_EXPANDER0_DS_UNADDRESSABLE_DEVICE (0x00000002)
  2413. #define MPI_SAS_EXPANDER0_DS_MULTIPLE_PORTS (0x00000004)
  2414. #define MPI_SAS_EXPANDER0_DS_EXPANDER_ERR (0x00000008)
  2415. #define MPI_SAS_EXPANDER0_DS_SMP_TIMEOUT (0x00000010)
  2416. #define MPI_SAS_EXPANDER0_DS_OUT_ROUTE_ENTRIES (0x00000020)
  2417. #define MPI_SAS_EXPANDER0_DS_INDEX_NOT_EXIST (0x00000040)
  2418. #define MPI_SAS_EXPANDER0_DS_SMP_FUNCTION_FAILED (0x00000080)
  2419. #define MPI_SAS_EXPANDER0_DS_SMP_CRC_ERROR (0x00000100)
  2420. #define MPI_SAS_EXPANDER0_DS_SUBTRACTIVE_LINK (0x00000200)
  2421. #define MPI_SAS_EXPANDER0_DS_TABLE_LINK (0x00000400)
  2422. #define MPI_SAS_EXPANDER0_DS_UNSUPPORTED_DEVICE (0x00000800)
  2423. /* values for SAS Expander Page 0 Flags field */
  2424. #define MPI_SAS_EXPANDER0_FLAGS_CONNECTOR_END_DEVICE (0x04)
  2425. #define MPI_SAS_EXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x02)
  2426. #define MPI_SAS_EXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x01)
  2427. typedef struct _CONFIG_PAGE_SAS_EXPANDER_1
  2428. {
  2429. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2430. U8 PhysicalPort; /* 08h */
  2431. U8 Reserved1; /* 09h */
  2432. U16 Reserved2; /* 0Ah */
  2433. U8 NumPhys; /* 0Ch */
  2434. U8 Phy; /* 0Dh */
  2435. U16 NumTableEntriesProgrammed; /* 0Eh */
  2436. U8 ProgrammedLinkRate; /* 10h */
  2437. U8 HwLinkRate; /* 11h */
  2438. U16 AttachedDevHandle; /* 12h */
  2439. U32 PhyInfo; /* 14h */
  2440. U32 AttachedDeviceInfo; /* 18h */
  2441. U16 OwnerDevHandle; /* 1Ch */
  2442. U8 ChangeCount; /* 1Eh */
  2443. U8 NegotiatedLinkRate; /* 1Fh */
  2444. U8 PhyIdentifier; /* 20h */
  2445. U8 AttachedPhyIdentifier; /* 21h */
  2446. U8 Reserved3; /* 22h */
  2447. U8 DiscoveryInfo; /* 23h */
  2448. U32 Reserved4; /* 24h */
  2449. } CONFIG_PAGE_SAS_EXPANDER_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_EXPANDER_1,
  2450. SasExpanderPage1_t, MPI_POINTER pSasExpanderPage1_t;
  2451. #define MPI_SASEXPANDER1_PAGEVERSION (0x01)
  2452. /* use MPI_SAS_PHY0_PRATE_ defines for ProgrammedLinkRate */
  2453. /* use MPI_SAS_PHY0_HWRATE_ defines for HwLinkRate */
  2454. /* use MPI_SAS_PHY0_PHYINFO_ defines for PhyInfo */
  2455. /* see mpi_sas.h for values for SAS Expander Page 1 AttachedDeviceInfo values */
  2456. /* values for SAS Expander Page 1 DiscoveryInfo field */
  2457. #define MPI_SAS_EXPANDER1_DISCINFO_BAD_PHY_DISABLED (0x04)
  2458. #define MPI_SAS_EXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02)
  2459. #define MPI_SAS_EXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01)
  2460. /* values for SAS Expander Page 1 NegotiatedLinkRate field */
  2461. #define MPI_SAS_EXPANDER1_NEG_RATE_UNKNOWN (0x00)
  2462. #define MPI_SAS_EXPANDER1_NEG_RATE_PHY_DISABLED (0x01)
  2463. #define MPI_SAS_EXPANDER1_NEG_RATE_FAILED_NEGOTIATION (0x02)
  2464. #define MPI_SAS_EXPANDER1_NEG_RATE_SATA_OOB_COMPLETE (0x03)
  2465. #define MPI_SAS_EXPANDER1_NEG_RATE_1_5 (0x08)
  2466. #define MPI_SAS_EXPANDER1_NEG_RATE_3_0 (0x09)
  2467. /****************************************************************************
  2468. * SAS Device Config Pages
  2469. ****************************************************************************/
  2470. typedef struct _CONFIG_PAGE_SAS_DEVICE_0
  2471. {
  2472. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2473. U16 Slot; /* 08h */
  2474. U16 EnclosureHandle; /* 0Ah */
  2475. U64 SASAddress; /* 0Ch */
  2476. U16 ParentDevHandle; /* 14h */
  2477. U8 PhyNum; /* 16h */
  2478. U8 AccessStatus; /* 17h */
  2479. U16 DevHandle; /* 18h */
  2480. U8 TargetID; /* 1Ah */
  2481. U8 Bus; /* 1Bh */
  2482. U32 DeviceInfo; /* 1Ch */
  2483. U16 Flags; /* 20h */
  2484. U8 PhysicalPort; /* 22h */
  2485. U8 Reserved2; /* 23h */
  2486. } CONFIG_PAGE_SAS_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_DEVICE_0,
  2487. SasDevicePage0_t, MPI_POINTER pSasDevicePage0_t;
  2488. #define MPI_SASDEVICE0_PAGEVERSION (0x05)
  2489. /* values for SAS Device Page 0 AccessStatus field */
  2490. #define MPI_SAS_DEVICE0_ASTATUS_NO_ERRORS (0x00)
  2491. #define MPI_SAS_DEVICE0_ASTATUS_SATA_INIT_FAILED (0x01)
  2492. #define MPI_SAS_DEVICE0_ASTATUS_SATA_CAPABILITY_FAILED (0x02)
  2493. #define MPI_SAS_DEVICE0_ASTATUS_SATA_AFFILIATION_CONFLICT (0x03)
  2494. #define MPI_SAS_DEVICE0_ASTATUS_SATA_NEEDS_INITIALIZATION (0x04)
  2495. /* specific values for SATA Init failures */
  2496. #define MPI_SAS_DEVICE0_ASTATUS_SIF_UNKNOWN (0x10)
  2497. #define MPI_SAS_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT (0x11)
  2498. #define MPI_SAS_DEVICE0_ASTATUS_SIF_DIAG (0x12)
  2499. #define MPI_SAS_DEVICE0_ASTATUS_SIF_IDENTIFICATION (0x13)
  2500. #define MPI_SAS_DEVICE0_ASTATUS_SIF_CHECK_POWER (0x14)
  2501. #define MPI_SAS_DEVICE0_ASTATUS_SIF_PIO_SN (0x15)
  2502. #define MPI_SAS_DEVICE0_ASTATUS_SIF_MDMA_SN (0x16)
  2503. #define MPI_SAS_DEVICE0_ASTATUS_SIF_UDMA_SN (0x17)
  2504. #define MPI_SAS_DEVICE0_ASTATUS_SIF_ZONING_VIOLATION (0x18)
  2505. #define MPI_SAS_DEVICE0_ASTATUS_SIF_NOT_ADDRESSABLE (0x19)
  2506. #define MPI_SAS_DEVICE0_ASTATUS_SIF_MAX (0x1F)
  2507. /* values for SAS Device Page 0 Flags field */
  2508. #define MPI_SAS_DEVICE0_FLAGS_SATA_ASYNCHRONOUS_NOTIFY (0x0400)
  2509. #define MPI_SAS_DEVICE0_FLAGS_SATA_SW_PRESERVE (0x0200)
  2510. #define MPI_SAS_DEVICE0_FLAGS_UNSUPPORTED_DEVICE (0x0100)
  2511. #define MPI_SAS_DEVICE0_FLAGS_SATA_48BIT_LBA_SUPPORTED (0x0080)
  2512. #define MPI_SAS_DEVICE0_FLAGS_SATA_SMART_SUPPORTED (0x0040)
  2513. #define MPI_SAS_DEVICE0_FLAGS_SATA_NCQ_SUPPORTED (0x0020)
  2514. #define MPI_SAS_DEVICE0_FLAGS_SATA_FUA_SUPPORTED (0x0010)
  2515. #define MPI_SAS_DEVICE0_FLAGS_PORT_SELECTOR_ATTACH (0x0008)
  2516. #define MPI_SAS_DEVICE0_FLAGS_MAPPING_PERSISTENT (0x0004)
  2517. #define MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED (0x0002)
  2518. #define MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001)
  2519. /* see mpi_sas.h for values for SAS Device Page 0 DeviceInfo values */
  2520. typedef struct _CONFIG_PAGE_SAS_DEVICE_1
  2521. {
  2522. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2523. U32 Reserved1; /* 08h */
  2524. U64 SASAddress; /* 0Ch */
  2525. U32 Reserved2; /* 14h */
  2526. U16 DevHandle; /* 18h */
  2527. U8 TargetID; /* 1Ah */
  2528. U8 Bus; /* 1Bh */
  2529. U8 InitialRegDeviceFIS[20];/* 1Ch */
  2530. } CONFIG_PAGE_SAS_DEVICE_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_DEVICE_1,
  2531. SasDevicePage1_t, MPI_POINTER pSasDevicePage1_t;
  2532. #define MPI_SASDEVICE1_PAGEVERSION (0x00)
  2533. typedef struct _CONFIG_PAGE_SAS_DEVICE_2
  2534. {
  2535. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2536. U64 PhysicalIdentifier; /* 08h */
  2537. U32 EnclosureMapping; /* 10h */
  2538. } CONFIG_PAGE_SAS_DEVICE_2, MPI_POINTER PTR_CONFIG_PAGE_SAS_DEVICE_2,
  2539. SasDevicePage2_t, MPI_POINTER pSasDevicePage2_t;
  2540. #define MPI_SASDEVICE2_PAGEVERSION (0x01)
  2541. /* defines for SAS Device Page 2 EnclosureMapping field */
  2542. #define MPI_SASDEVICE2_ENC_MAP_MASK_MISSING_COUNT (0x0000000F)
  2543. #define MPI_SASDEVICE2_ENC_MAP_SHIFT_MISSING_COUNT (0)
  2544. #define MPI_SASDEVICE2_ENC_MAP_MASK_NUM_SLOTS (0x000007F0)
  2545. #define MPI_SASDEVICE2_ENC_MAP_SHIFT_NUM_SLOTS (4)
  2546. #define MPI_SASDEVICE2_ENC_MAP_MASK_START_INDEX (0x001FF800)
  2547. #define MPI_SASDEVICE2_ENC_MAP_SHIFT_START_INDEX (11)
  2548. /****************************************************************************
  2549. * SAS PHY Config Pages
  2550. ****************************************************************************/
  2551. typedef struct _CONFIG_PAGE_SAS_PHY_0
  2552. {
  2553. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2554. U16 OwnerDevHandle; /* 08h */
  2555. U16 Reserved1; /* 0Ah */
  2556. U64 SASAddress; /* 0Ch */
  2557. U16 AttachedDevHandle; /* 14h */
  2558. U8 AttachedPhyIdentifier; /* 16h */
  2559. U8 Reserved2; /* 17h */
  2560. U32 AttachedDeviceInfo; /* 18h */
  2561. U8 ProgrammedLinkRate; /* 1Ch */
  2562. U8 HwLinkRate; /* 1Dh */
  2563. U8 ChangeCount; /* 1Eh */
  2564. U8 Flags; /* 1Fh */
  2565. U32 PhyInfo; /* 20h */
  2566. } CONFIG_PAGE_SAS_PHY_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_0,
  2567. SasPhyPage0_t, MPI_POINTER pSasPhyPage0_t;
  2568. #define MPI_SASPHY0_PAGEVERSION (0x01)
  2569. /* values for SAS PHY Page 0 ProgrammedLinkRate field */
  2570. #define MPI_SAS_PHY0_PRATE_MAX_RATE_MASK (0xF0)
  2571. #define MPI_SAS_PHY0_PRATE_MAX_RATE_NOT_PROGRAMMABLE (0x00)
  2572. #define MPI_SAS_PHY0_PRATE_MAX_RATE_1_5 (0x80)
  2573. #define MPI_SAS_PHY0_PRATE_MAX_RATE_3_0 (0x90)
  2574. #define MPI_SAS_PHY0_PRATE_MIN_RATE_MASK (0x0F)
  2575. #define MPI_SAS_PHY0_PRATE_MIN_RATE_NOT_PROGRAMMABLE (0x00)
  2576. #define MPI_SAS_PHY0_PRATE_MIN_RATE_1_5 (0x08)
  2577. #define MPI_SAS_PHY0_PRATE_MIN_RATE_3_0 (0x09)
  2578. /* values for SAS PHY Page 0 HwLinkRate field */
  2579. #define MPI_SAS_PHY0_HWRATE_MAX_RATE_MASK (0xF0)
  2580. #define MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5 (0x80)
  2581. #define MPI_SAS_PHY0_HWRATE_MAX_RATE_3_0 (0x90)
  2582. #define MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK (0x0F)
  2583. #define MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5 (0x08)
  2584. #define MPI_SAS_PHY0_HWRATE_MIN_RATE_3_0 (0x09)
  2585. /* values for SAS PHY Page 0 Flags field */
  2586. #define MPI_SAS_PHY0_FLAGS_SGPIO_DIRECT_ATTACH_ENC (0x01)
  2587. /* values for SAS PHY Page 0 PhyInfo field */
  2588. #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_ACTIVE (0x00004000)
  2589. #define MPI_SAS_PHY0_PHYINFO_SATA_PORT_SELECTOR (0x00002000)
  2590. #define MPI_SAS_PHY0_PHYINFO_VIRTUAL_PHY (0x00001000)
  2591. #define MPI_SAS_PHY0_PHYINFO_MASK_PARTIAL_PATHWAY_TIME (0x00000F00)
  2592. #define MPI_SAS_PHY0_PHYINFO_SHIFT_PARTIAL_PATHWAY_TIME (8)
  2593. #define MPI_SAS_PHY0_PHYINFO_MASK_ROUTING_ATTRIBUTE (0x000000F0)
  2594. #define MPI_SAS_PHY0_PHYINFO_DIRECT_ROUTING (0x00000000)
  2595. #define MPI_SAS_PHY0_PHYINFO_SUBTRACTIVE_ROUTING (0x00000010)
  2596. #define MPI_SAS_PHY0_PHYINFO_TABLE_ROUTING (0x00000020)
  2597. #define MPI_SAS_PHY0_PHYINFO_MASK_LINK_RATE (0x0000000F)
  2598. #define MPI_SAS_PHY0_PHYINFO_UNKNOWN_LINK_RATE (0x00000000)
  2599. #define MPI_SAS_PHY0_PHYINFO_PHY_DISABLED (0x00000001)
  2600. #define MPI_SAS_PHY0_PHYINFO_NEGOTIATION_FAILED (0x00000002)
  2601. #define MPI_SAS_PHY0_PHYINFO_SATA_OOB_COMPLETE (0x00000003)
  2602. #define MPI_SAS_PHY0_PHYINFO_RATE_1_5 (0x00000008)
  2603. #define MPI_SAS_PHY0_PHYINFO_RATE_3_0 (0x00000009)
  2604. typedef struct _CONFIG_PAGE_SAS_PHY_1
  2605. {
  2606. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2607. U32 Reserved1; /* 08h */
  2608. U32 InvalidDwordCount; /* 0Ch */
  2609. U32 RunningDisparityErrorCount; /* 10h */
  2610. U32 LossDwordSynchCount; /* 14h */
  2611. U32 PhyResetProblemCount; /* 18h */
  2612. } CONFIG_PAGE_SAS_PHY_1, MPI_POINTER PTR_CONFIG_PAGE_SAS_PHY_1,
  2613. SasPhyPage1_t, MPI_POINTER pSasPhyPage1_t;
  2614. #define MPI_SASPHY1_PAGEVERSION (0x00)
  2615. /****************************************************************************
  2616. * SAS Enclosure Config Pages
  2617. ****************************************************************************/
  2618. typedef struct _CONFIG_PAGE_SAS_ENCLOSURE_0
  2619. {
  2620. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2621. U32 Reserved1; /* 08h */
  2622. U64 EnclosureLogicalID; /* 0Ch */
  2623. U16 Flags; /* 14h */
  2624. U16 EnclosureHandle; /* 16h */
  2625. U16 NumSlots; /* 18h */
  2626. U16 StartSlot; /* 1Ah */
  2627. U8 StartTargetID; /* 1Ch */
  2628. U8 StartBus; /* 1Dh */
  2629. U8 SEPTargetID; /* 1Eh */
  2630. U8 SEPBus; /* 1Fh */
  2631. U32 Reserved2; /* 20h */
  2632. U32 Reserved3; /* 24h */
  2633. } CONFIG_PAGE_SAS_ENCLOSURE_0, MPI_POINTER PTR_CONFIG_PAGE_SAS_ENCLOSURE_0,
  2634. SasEnclosurePage0_t, MPI_POINTER pSasEnclosurePage0_t;
  2635. #define MPI_SASENCLOSURE0_PAGEVERSION (0x01)
  2636. /* values for SAS Enclosure Page 0 Flags field */
  2637. #define MPI_SAS_ENCLS0_FLAGS_SEP_BUS_ID_VALID (0x0020)
  2638. #define MPI_SAS_ENCLS0_FLAGS_START_BUS_ID_VALID (0x0010)
  2639. #define MPI_SAS_ENCLS0_FLAGS_MNG_MASK (0x000F)
  2640. #define MPI_SAS_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000)
  2641. #define MPI_SAS_ENCLS0_FLAGS_MNG_IOC_SES (0x0001)
  2642. #define MPI_SAS_ENCLS0_FLAGS_MNG_IOC_SGPIO (0x0002)
  2643. #define MPI_SAS_ENCLS0_FLAGS_MNG_EXP_SGPIO (0x0003)
  2644. #define MPI_SAS_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0004)
  2645. #define MPI_SAS_ENCLS0_FLAGS_MNG_IOC_GPIO (0x0005)
  2646. /****************************************************************************
  2647. * Log Config Pages
  2648. ****************************************************************************/
  2649. /*
  2650. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  2651. * one and check NumLogEntries at runtime.
  2652. */
  2653. #ifndef MPI_LOG_0_NUM_LOG_ENTRIES
  2654. #define MPI_LOG_0_NUM_LOG_ENTRIES (1)
  2655. #endif
  2656. #define MPI_LOG_0_LOG_DATA_LENGTH (0x1C)
  2657. typedef struct _MPI_LOG_0_ENTRY
  2658. {
  2659. U32 TimeStamp; /* 00h */
  2660. U32 Reserved1; /* 04h */
  2661. U16 LogSequence; /* 08h */
  2662. U16 LogEntryQualifier; /* 0Ah */
  2663. U8 LogData[MPI_LOG_0_LOG_DATA_LENGTH]; /* 0Ch */
  2664. } MPI_LOG_0_ENTRY, MPI_POINTER PTR_MPI_LOG_0_ENTRY,
  2665. MpiLog0Entry_t, MPI_POINTER pMpiLog0Entry_t;
  2666. /* values for Log Page 0 LogEntry LogEntryQualifier field */
  2667. #define MPI_LOG_0_ENTRY_QUAL_ENTRY_UNUSED (0x0000)
  2668. #define MPI_LOG_0_ENTRY_QUAL_POWER_ON_RESET (0x0001)
  2669. typedef struct _CONFIG_PAGE_LOG_0
  2670. {
  2671. CONFIG_EXTENDED_PAGE_HEADER Header; /* 00h */
  2672. U32 Reserved1; /* 08h */
  2673. U32 Reserved2; /* 0Ch */
  2674. U16 NumLogEntries; /* 10h */
  2675. U16 Reserved3; /* 12h */
  2676. MPI_LOG_0_ENTRY LogEntry[MPI_LOG_0_NUM_LOG_ENTRIES]; /* 14h */
  2677. } CONFIG_PAGE_LOG_0, MPI_POINTER PTR_CONFIG_PAGE_LOG_0,
  2678. LogPage0_t, MPI_POINTER pLogPage0_t;
  2679. #define MPI_LOG_0_PAGEVERSION (0x01)
  2680. #endif