Print this page
Add support for more than 8 MSI-X interrupts.
Tidy up interrupt assignement and card ID messages.
Initial modifications using the code changes present between
the LSI source code for FreeBSD drivers. Specifically the changes
between from mpslsi-source-17.00.00.00 -> mpslsi-source-03.00.00.00.
This mainly involves using a different scatter/gather element in
frame setup.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/scsi/adapters/mpt_sas3/mpi/mpi2.h
          +++ new/usr/src/uts/common/sys/scsi/adapters/mpt_sas3/mpi/mpi2.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23      - * Copyright (c) 2000 to 2009, LSI Corporation.
  24      - * All rights reserved.
       23 + *  Copyright (c) 2000-2012 LSI Corporation.
  25   24   *
  26   25   * Redistribution and use in source and binary forms of all code within
  27   26   * this file that is exclusively owned by LSI, with or without
  28   27   * modification, is permitted provided that, in addition to the CDDL 1.0
  29   28   * License requirements, the following conditions are met:
  30   29   *
  31   30   *    Neither the name of the author nor the names of its contributors may be
  32   31   *    used to endorse or promote products derived from this software without
  33   32   *    specific prior written permission.
  34   33   *
↓ open down ↓ 11 lines elided ↑ open up ↑
  46   45   * DAMAGE.
  47   46   */
  48   47  
  49   48  /*
  50   49   *           Name:  mpi2.h
  51   50   *          Title:  MPI Message independent structures and definitions
  52   51   *                  including System Interface Register Set and
  53   52   *                  scatter/gather formats.
  54   53   *  Creation Date:  June 21, 2006
  55   54   *
  56      - *  mpi2.h Version:  02.00.13
       55 + *  mpi2.h Version:  02.00.xx
       56 + *
       57 + *  NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
       58 + *        prefix are for use only on MPI v2.5 products, and must not be used
       59 + *        with MPI v2.0 products. Unless otherwise noted, names beginning with
       60 + *        MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
  57   61   *
  58   62   *  Version History
  59   63   *  ---------------
  60   64   *
  61   65   *  Date      Version   Description
  62   66   *  --------  --------  ------------------------------------------------------
  63   67   *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
  64   68   *  06-04-07  02.00.01  Bumped MPI2_HEADER_VERSION_UNIT.
  65   69   *  06-26-07  02.00.02  Bumped MPI2_HEADER_VERSION_UNIT.
  66   70   *  08-31-07  02.00.03  Bumped MPI2_HEADER_VERSION_UNIT.
↓ open down ↓ 37 lines elided ↑ open up ↑
 104  108  #ifndef MPI2_H
 105  109  #define MPI2_H
 106  110  
 107  111  
 108  112  /*****************************************************************************
 109  113  *
 110  114  *        MPI Version Definitions
 111  115  *
 112  116  *****************************************************************************/
 113  117  
 114      -#define MPI2_VERSION_MAJOR                  (0x02)
 115      -#define MPI2_VERSION_MINOR                  (0x00)
 116  118  #define MPI2_VERSION_MAJOR_MASK             (0xFF00)
 117  119  #define MPI2_VERSION_MAJOR_SHIFT            (8)
 118  120  #define MPI2_VERSION_MINOR_MASK             (0x00FF)
 119  121  #define MPI2_VERSION_MINOR_SHIFT            (0)
      122 +
      123 +/* major version for all MPI v2.x */
      124 +#define MPI2_VERSION_MAJOR                  (0x02)
      125 +
      126 +/* minor version for MPI v2.0 compatible products */
      127 +#define MPI2_VERSION_MINOR                  (0x00)
 120  128  #define MPI2_VERSION ((MPI2_VERSION_MAJOR << MPI2_VERSION_MAJOR_SHIFT) |   \
 121  129                                        MPI2_VERSION_MINOR)
 122      -
 123  130  #define MPI2_VERSION_02_00                  (0x0200)
 124  131  
 125      -/* versioning for this MPI header set */
 126      -#define MPI2_HEADER_VERSION_UNIT            (0x0D)
      132 +
      133 +/* minor version for MPI v2.5 compatible products */
      134 +#define MPI25_VERSION_MINOR                 (0x05)
      135 +#define MPI25_VERSION ((MPI2_VERSION_MAJOR << MPI2_VERSION_MAJOR_SHIFT) |   \
      136 +                                      MPI25_VERSION_MINOR)
      137 +#define MPI2_VERSION_02_05                  (0x0205)
      138 +
      139 +
      140 +/* Unit and Dev versioning for this MPI header set */
      141 +#define MPI2_HEADER_VERSION_UNIT            (0x12)
 127  142  #define MPI2_HEADER_VERSION_DEV             (0x00)
 128  143  #define MPI2_HEADER_VERSION_UNIT_MASK       (0xFF00)
 129  144  #define MPI2_HEADER_VERSION_UNIT_SHIFT      (8)
 130  145  #define MPI2_HEADER_VERSION_DEV_MASK        (0x00FF)
 131  146  #define MPI2_HEADER_VERSION_DEV_SHIFT       (0)
 132  147  #define MPI2_HEADER_VERSION ((MPI2_HEADER_VERSION_UNIT << 8) | MPI2_HEADER_VERSION_DEV)
 133  148  
 134  149  
 135  150  /*****************************************************************************
 136  151  *
↓ open down ↓ 39 lines elided ↑ open up ↑
 176  191      U32         Reserved4[8];               /* 0x4C */
 177  192      U32         ReplyPostHostIndex;         /* 0x6C */
 178  193      U32         Reserved5;                  /* 0x70 */
 179  194      U32         HCBSize;                    /* 0x74 */
 180  195      U32         HCBAddressLow;              /* 0x78 */
 181  196      U32         HCBAddressHigh;             /* 0x7C */
 182  197      U32         Reserved6[16];              /* 0x80 */
 183  198      U32         RequestDescriptorPostLow;   /* 0xC0 */
 184  199      U32         RequestDescriptorPostHigh;  /* 0xC4 */
 185  200      U32         Reserved7[14];              /* 0xC8 */
      201 +    U32         Reserved8[128];             /* 0x100 */
      202 +    U32         Reserved10[3];              /* 0x300 */
      203 +    U32         SuppReplyPostHostIndex[32]; /* 0x30C */
 186  204  } MPI2_SYSTEM_INTERFACE_REGS, MPI2_POINTER PTR_MPI2_SYSTEM_INTERFACE_REGS,
 187  205    Mpi2SystemInterfaceRegs_t, MPI2_POINTER pMpi2SystemInterfaceRegs_t;
 188  206  
 189  207  /*
 190  208   * Defines for working with the Doorbell register.
 191  209   */
 192  210  #define MPI2_DOORBELL_OFFSET                    (0x00000000)
 193  211  
 194  212  /* IOC --> System values */
 195  213  #define MPI2_DOORBELL_USED                      (0x08000000)
↓ open down ↓ 77 lines elided ↑ open up ↑
 273  291  
 274  292  /*
 275  293   * Offset for the Reply Free Queue
 276  294   */
 277  295  #define MPI2_REPLY_FREE_HOST_INDEX_OFFSET       (0x00000048)
 278  296  
 279  297  /*
 280  298   * Offset for the Reply Descriptor Post Queue
 281  299   */
 282  300  #define MPI2_REPLY_POST_HOST_INDEX_OFFSET       (0x0000006C)
      301 +#define MPI2_REPLY_POST_HOST_INDEX_MASK         (0x00FFFFFF)
      302 +#define MPI2_RPHI_MSIX_INDEX_MASK               (0xFF000000)
      303 +#define MPI2_RPHI_MSIX_INDEX_SHIFT              (24)
 283  304  
 284  305  /*
 285  306   * Defines for the HCBSize and address
 286  307   */
 287  308  #define MPI2_HCB_SIZE_OFFSET                    (0x00000074)
 288  309  #define MPI2_HCB_SIZE_SIZE_MASK                 (0xFFFFF000)
 289  310  #define MPI2_HCB_SIZE_HCB_ENABLE                (0x00000001)
 290  311  
 291  312  #define MPI2_HCB_ADDRESS_LOW_OFFSET             (0x00000078)
 292  313  #define MPI2_HCB_ADDRESS_HIGH_OFFSET            (0x0000007C)
 293  314  
 294  315  /*
 295  316   * Offsets for the Request Queue
 296  317   */
 297  318  #define MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET     (0x000000C0)
 298  319  #define MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET    (0x000000C4)
 299  320  
      321 +/*
      322 + * Offset for the Supplimentary Host Index Base
      323 + * For use with more than 8 MSI-X interrupts.
      324 + */
      325 +#define MPI2_SUP_REPLY_POST_HOST_INDEX_OFFSET   (0x0000030C)
      326 +
 300  327  
 301  328  /*****************************************************************************
 302  329  *
 303  330  *        Message Descriptors
 304  331  *
 305  332  *****************************************************************************/
 306  333  
 307  334  /* Request Descriptors */
 308  335  
 309  336  /* Default Request Descriptor */
↓ open down ↓ 8 lines elided ↑ open up ↑
 318  345    MPI2_POINTER PTR_MPI2_DEFAULT_REQUEST_DESCRIPTOR,
 319  346    Mpi2DefaultRequestDescriptor_t, MPI2_POINTER pMpi2DefaultRequestDescriptor_t;
 320  347  
 321  348  /* defines for the RequestFlags field */
 322  349  #define MPI2_REQ_DESCRIPT_FLAGS_TYPE_MASK               (0x0E)
 323  350  #define MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO                 (0x00)
 324  351  #define MPI2_REQ_DESCRIPT_FLAGS_SCSI_TARGET             (0x02)
 325  352  #define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY           (0x06)
 326  353  #define MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE            (0x08)
 327  354  #define MPI2_REQ_DESCRIPT_FLAGS_RAID_ACCELERATOR        (0x0A)
      355 +#define MPI25_REQ_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO      (0x0C)
 328  356  
 329  357  #define MPI2_REQ_DESCRIPT_FLAGS_IOC_FIFO_MARKER (0x01)
 330  358  
 331  359  
 332  360  /* High Priority Request Descriptor */
 333  361  typedef struct _MPI2_HIGH_PRIORITY_REQUEST_DESCRIPTOR
 334  362  {
 335  363      U8              RequestFlags;               /* 0x00 */
 336  364      U8              MSIxIndex;                  /* 0x01 */
 337  365      U16             SMID;                       /* 0x02 */
↓ open down ↓ 39 lines elided ↑ open up ↑
 377  405      U8              MSIxIndex;                  /* 0x01 */
 378  406      U16             SMID;                       /* 0x02 */
 379  407      U16             LMID;                       /* 0x04 */
 380  408      U16             Reserved;                   /* 0x06 */
 381  409  } MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR,
 382  410    MPI2_POINTER PTR_MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR,
 383  411    Mpi2RAIDAcceleratorRequestDescriptor_t,
 384  412    MPI2_POINTER pMpi2RAIDAcceleratorRequestDescriptor_t;
 385  413  
 386  414  
      415 +/* Fast Path SCSI IO Request Descriptor */
      416 +typedef MPI2_SCSI_IO_REQUEST_DESCRIPTOR
      417 +    MPI25_FP_SCSI_IO_REQUEST_DESCRIPTOR,
      418 +    MPI2_POINTER PTR_MPI25_FP_SCSI_IO_REQUEST_DESCRIPTOR,
      419 +    Mpi25FastPathSCSIIORequestDescriptor_t,
      420 +    MPI2_POINTER pMpi25FastPathSCSIIORequestDescriptor_t;
      421 +
      422 +
 387  423  /* union of Request Descriptors */
 388  424  typedef union _MPI2_REQUEST_DESCRIPTOR_UNION
 389  425  {
 390  426      MPI2_DEFAULT_REQUEST_DESCRIPTOR             Default;
 391  427      MPI2_HIGH_PRIORITY_REQUEST_DESCRIPTOR       HighPriority;
 392  428      MPI2_SCSI_IO_REQUEST_DESCRIPTOR             SCSIIO;
 393  429      MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR         SCSITarget;
 394  430      MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR          RAIDAccelerator;
      431 +    MPI25_FP_SCSI_IO_REQUEST_DESCRIPTOR         FastPathSCSIIO;
 395  432      U64                                         Words;
 396  433  } MPI2_REQUEST_DESCRIPTOR_UNION, MPI2_POINTER PTR_MPI2_REQUEST_DESCRIPTOR_UNION,
 397  434    Mpi2RequestDescriptorUnion_t, MPI2_POINTER pMpi2RequestDescriptorUnion_t;
 398  435  
 399  436  
 400  437  /* Reply Descriptors */
 401  438  
 402  439  /* Default Reply Descriptor */
 403  440  typedef struct _MPI2_DEFAULT_REPLY_DESCRIPTOR
 404  441  {
↓ open down ↓ 4 lines elided ↑ open up ↑
 409  446  } MPI2_DEFAULT_REPLY_DESCRIPTOR, MPI2_POINTER PTR_MPI2_DEFAULT_REPLY_DESCRIPTOR,
 410  447    Mpi2DefaultReplyDescriptor_t, MPI2_POINTER pMpi2DefaultReplyDescriptor_t;
 411  448  
 412  449  /* defines for the ReplyFlags field */
 413  450  #define MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK                   (0x0F)
 414  451  #define MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS             (0x00)
 415  452  #define MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY               (0x01)
 416  453  #define MPI2_RPY_DESCRIPT_FLAGS_TARGETASSIST_SUCCESS        (0x02)
 417  454  #define MPI2_RPY_DESCRIPT_FLAGS_TARGET_COMMAND_BUFFER       (0x03)
 418  455  #define MPI2_RPY_DESCRIPT_FLAGS_RAID_ACCELERATOR_SUCCESS    (0x05)
      456 +#define MPI25_RPY_DESCRIPT_FLAGS_FAST_PATH_SCSI_IO_SUCCESS  (0x06)
 419  457  #define MPI2_RPY_DESCRIPT_FLAGS_UNUSED                      (0x0F)
 420  458  
 421  459  /* values for marking a reply descriptor as unused */
 422  460  #define MPI2_RPY_DESCRIPT_UNUSED_WORD0_MARK             (0xFFFFFFFF)
 423  461  #define MPI2_RPY_DESCRIPT_UNUSED_WORD1_MARK             (0xFFFFFFFF)
 424  462  
 425  463  /* Address Reply Descriptor */
 426  464  typedef struct _MPI2_ADDRESS_REPLY_DESCRIPTOR
 427  465  {
 428  466      U8              ReplyFlags;                 /* 0x00 */
↓ open down ↓ 59 lines elided ↑ open up ↑
 488  526      U8              ReplyFlags;                 /* 0x00 */
 489  527      U8              MSIxIndex;                  /* 0x01 */
 490  528      U16             SMID;                       /* 0x02 */
 491  529      U32             Reserved;                   /* 0x04 */
 492  530  } MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR,
 493  531    MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR,
 494  532    Mpi2RAIDAcceleratorSuccessReplyDescriptor_t,
 495  533    MPI2_POINTER pMpi2RAIDAcceleratorSuccessReplyDescriptor_t;
 496  534  
 497  535  
      536 +/* Fast Path SCSI IO Success Reply Descriptor */
      537 +typedef MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR
      538 +    MPI25_FP_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR,
      539 +    MPI2_POINTER PTR_MPI25_FP_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR,
      540 +    Mpi25FastPathSCSIIOSuccessReplyDescriptor_t,
      541 +    MPI2_POINTER pMpi25FastPathSCSIIOSuccessReplyDescriptor_t;
      542 +
      543 +
 498  544  /* union of Reply Descriptors */
 499  545  typedef union _MPI2_REPLY_DESCRIPTORS_UNION
 500  546  {
 501  547      MPI2_DEFAULT_REPLY_DESCRIPTOR                   Default;
 502  548      MPI2_ADDRESS_REPLY_DESCRIPTOR                   AddressReply;
 503  549      MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR           SCSIIOSuccess;
 504  550      MPI2_TARGETASSIST_SUCCESS_REPLY_DESCRIPTOR      TargetAssistSuccess;
 505  551      MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR     TargetCommandBuffer;
 506  552      MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR  RAIDAcceleratorSuccess;
      553 +    MPI25_FP_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR       FastPathSCSIIOSuccess;
 507  554      U64                                             Words;
 508  555  } MPI2_REPLY_DESCRIPTORS_UNION, MPI2_POINTER PTR_MPI2_REPLY_DESCRIPTORS_UNION,
 509  556    Mpi2ReplyDescriptorsUnion_t, MPI2_POINTER pMpi2ReplyDescriptorsUnion_t;
 510  557  
 511  558  
 512  559  
 513  560  /*****************************************************************************
 514  561  *
 515  562  *        Message Functions
 516  563  *              0x80 -> 0x8F reserved for private message use per product
↓ open down ↓ 20 lines elided ↑ open up ↑
 537  584  #define MPI2_FUNCTION_TOOLBOX                       (0x17) /* Toolbox */
 538  585  #define MPI2_FUNCTION_SCSI_ENCLOSURE_PROCESSOR      (0x18) /* SCSI Enclosure Processor */
 539  586  #define MPI2_FUNCTION_SMP_PASSTHROUGH               (0x1A) /* SMP Passthrough */
 540  587  #define MPI2_FUNCTION_SAS_IO_UNIT_CONTROL           (0x1B) /* SAS IO Unit Control */
 541  588  #define MPI2_FUNCTION_SATA_PASSTHROUGH              (0x1C) /* SATA Passthrough */
 542  589  #define MPI2_FUNCTION_DIAG_BUFFER_POST              (0x1D) /* Diagnostic Buffer Post */
 543  590  #define MPI2_FUNCTION_DIAG_RELEASE                  (0x1E) /* Diagnostic Release */
 544  591  #define MPI2_FUNCTION_TARGET_CMD_BUF_BASE_POST      (0x24) /* Target Command Buffer Post Base */
 545  592  #define MPI2_FUNCTION_TARGET_CMD_BUF_LIST_POST      (0x25) /* Target Command Buffer Post List */
 546  593  #define MPI2_FUNCTION_RAID_ACCELERATOR              (0x2C) /* RAID Accelerator */
      594 +#define MPI2_FUNCTION_HOST_BASED_DISCOVERY_ACTION   (0x2F) /* Host Based Discovery Action */
      595 +#define MPI2_FUNCTION_PWR_MGMT_CONTROL              (0x30) /* Power Management Control */
      596 +#define MPI2_FUNCTION_MIN_PRODUCT_SPECIFIC          (0xF0) /* beginning of product-specific range */
      597 +#define MPI2_FUNCTION_MAX_PRODUCT_SPECIFIC          (0xFF) /* end of product-specific range */
 547  598  
 548  599  
 549  600  
 550  601  /* Doorbell functions */
 551  602  #define MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET        (0x40)
 552      -/* #define MPI2_FUNCTION_IO_UNIT_RESET                 (0x41) */
 553  603  #define MPI2_FUNCTION_HANDSHAKE                     (0x42)
 554  604  
 555  605  
 556  606  /*****************************************************************************
 557  607  *
 558  608  *        IOC Status Values
 559  609  *
 560  610  *****************************************************************************/
 561  611  
 562  612  /* mask for IOCStatus status value */
↓ open down ↓ 207 lines elided ↑ open up ↑
 770  820      union
 771  821      {
 772  822          U32                 Address32;
 773  823          U64                 Address64;
 774  824      } u;
 775  825  } MPI2_SGE_SIMPLE_UNION, MPI2_POINTER PTR_MPI2_SGE_SIMPLE_UNION,
 776  826    Mpi2SGESimpleUnion_t, MPI2_POINTER pMpi2SGESimpleUnion_t;
 777  827  
 778  828  
 779  829  /****************************************************************************
 780      -*  MPI Chain Element structures
      830 +*  MPI Chain Element structures - for MPI v2.0 products only
 781  831  ****************************************************************************/
 782  832  
 783  833  typedef struct _MPI2_SGE_CHAIN32
 784  834  {
 785  835      U16                     Length;
 786  836      U8                      NextChainOffset;
 787  837      U8                      Flags;
 788  838      U32                     Address;
 789  839  } MPI2_SGE_CHAIN32, MPI2_POINTER PTR_MPI2_SGE_CHAIN32,
 790  840    Mpi2SGEChain32_t, MPI2_POINTER pMpi2SGEChain32_t;
↓ open down ↓ 15 lines elided ↑ open up ↑
 806  856      union
 807  857      {
 808  858          U32                 Address32;
 809  859          U64                 Address64;
 810  860      } u;
 811  861  } MPI2_SGE_CHAIN_UNION, MPI2_POINTER PTR_MPI2_SGE_CHAIN_UNION,
 812  862    Mpi2SGEChainUnion_t, MPI2_POINTER pMpi2SGEChainUnion_t;
 813  863  
 814  864  
 815  865  /****************************************************************************
 816      -*  MPI Transaction Context Element structures
      866 +*  MPI Transaction Context Element structures - for MPI v2.0 products only
 817  867  ****************************************************************************/
 818  868  
 819  869  typedef struct _MPI2_SGE_TRANSACTION32
 820  870  {
 821  871      U8                      Reserved;
 822  872      U8                      ContextSize;
 823  873      U8                      DetailsLength;
 824  874      U8                      Flags;
 825  875      U32                     TransactionContext[1];
 826  876      U32                     TransactionDetails[1];
↓ open down ↓ 45 lines elided ↑ open up ↑
 872  922          U32                 TransactionContext64[2];
 873  923          U32                 TransactionContext96[3];
 874  924          U32                 TransactionContext128[4];
 875  925      } u;
 876  926      U32                     TransactionDetails[1];
 877  927  } MPI2_SGE_TRANSACTION_UNION, MPI2_POINTER PTR_MPI2_SGE_TRANSACTION_UNION,
 878  928    Mpi2SGETransactionUnion_t, MPI2_POINTER pMpi2SGETransactionUnion_t;
 879  929  
 880  930  
 881  931  /****************************************************************************
 882      -*  MPI SGE union for IO SGL's
      932 +*  MPI SGE union for IO SGL's - for MPI v2.0 products only
 883  933  ****************************************************************************/
 884  934  
 885  935  typedef struct _MPI2_MPI_SGE_IO_UNION
 886  936  {
 887  937      union
 888  938      {
 889  939          MPI2_SGE_SIMPLE_UNION   Simple;
 890  940          MPI2_SGE_CHAIN_UNION    Chain;
 891  941      } u;
 892  942  } MPI2_MPI_SGE_IO_UNION, MPI2_POINTER PTR_MPI2_MPI_SGE_IO_UNION,
 893  943    Mpi2MpiSGEIOUnion_t, MPI2_POINTER pMpi2MpiSGEIOUnion_t;
 894  944  
 895  945  
 896  946  /****************************************************************************
 897      -*  MPI SGE union for SGL's with Simple and Transaction elements
      947 +*  MPI SGE union for SGL's with Simple and Transaction elements - for MPI v2.0 products only
 898  948  ****************************************************************************/
 899  949  
 900  950  typedef struct _MPI2_SGE_TRANS_SIMPLE_UNION
 901  951  {
 902  952      union
 903  953      {
 904  954          MPI2_SGE_SIMPLE_UNION       Simple;
 905  955          MPI2_SGE_TRANSACTION_UNION  Transaction;
 906  956      } u;
 907  957  } MPI2_SGE_TRANS_SIMPLE_UNION, MPI2_POINTER PTR_MPI2_SGE_TRANS_SIMPLE_UNION,
↓ open down ↓ 30 lines elided ↑ open up ↑
 938  988  #define MPI2_SGE_FLAGS_ADDRESS_SIZE             (0x02)
 939  989  #define MPI2_SGE_FLAGS_END_OF_LIST              (0x01)
 940  990  
 941  991  #define MPI2_SGE_FLAGS_SHIFT                    (24)
 942  992  
 943  993  #define MPI2_SGE_LENGTH_MASK                    (0x00FFFFFF)
 944  994  #define MPI2_SGE_CHAIN_LENGTH_MASK              (0x0000FFFF)
 945  995  
 946  996  /* Element Type */
 947  997  
 948      -#define MPI2_SGE_FLAGS_TRANSACTION_ELEMENT      (0x00)
      998 +#define MPI2_SGE_FLAGS_TRANSACTION_ELEMENT      (0x00) /* for MPI v2.0 products only */
 949  999  #define MPI2_SGE_FLAGS_SIMPLE_ELEMENT           (0x10)
 950      -#define MPI2_SGE_FLAGS_CHAIN_ELEMENT            (0x30)
     1000 +#define MPI2_SGE_FLAGS_CHAIN_ELEMENT            (0x30) /* for MPI v2.0 products only */
 951 1001  #define MPI2_SGE_FLAGS_ELEMENT_MASK             (0x30)
 952 1002  
 953 1003  /* Address location */
 954 1004  
 955 1005  #define MPI2_SGE_FLAGS_SYSTEM_ADDRESS           (0x00)
 956 1006  
 957 1007  /* Direction */
 958 1008  
 959 1009  #define MPI2_SGE_FLAGS_IOC_TO_HOST              (0x00)
 960 1010  #define MPI2_SGE_FLAGS_HOST_TO_IOC              (0x04)
 961 1011  
     1012 +#define MPI2_SGE_FLAGS_DEST                     (MPI2_SGE_FLAGS_IOC_TO_HOST)
     1013 +#define MPI2_SGE_FLAGS_SOURCE                   (MPI2_SGE_FLAGS_HOST_TO_IOC)
     1014 +
 962 1015  /* Address Size */
 963 1016  
 964 1017  #define MPI2_SGE_FLAGS_32_BIT_ADDRESSING        (0x00)
 965 1018  #define MPI2_SGE_FLAGS_64_BIT_ADDRESSING        (0x02)
 966 1019  
 967 1020  /* Context Size */
 968 1021  
 969 1022  #define MPI2_SGE_FLAGS_32_BIT_CONTEXT           (0x00)
 970 1023  #define MPI2_SGE_FLAGS_64_BIT_CONTEXT           (0x02)
 971 1024  #define MPI2_SGE_FLAGS_96_BIT_CONTEXT           (0x04)
↓ open down ↓ 28 lines elided ↑ open up ↑
1000 1053  /*****************************************************************************
1001 1054  *
1002 1055  *        Fusion-MPT IEEE Scatter Gather Elements
1003 1056  *
1004 1057  *****************************************************************************/
1005 1058  
1006 1059  /****************************************************************************
1007 1060  *  IEEE Simple Element structures
1008 1061  ****************************************************************************/
1009 1062  
     1063 +/* MPI2_IEEE_SGE_SIMPLE32 is for MPI v2.0 products only */
1010 1064  typedef struct _MPI2_IEEE_SGE_SIMPLE32
1011 1065  {
1012 1066      U32                     Address;
1013 1067      U32                     FlagsLength;
1014 1068  } MPI2_IEEE_SGE_SIMPLE32, MPI2_POINTER PTR_MPI2_IEEE_SGE_SIMPLE32,
1015 1069    Mpi2IeeeSgeSimple32_t, MPI2_POINTER pMpi2IeeeSgeSimple32_t;
1016 1070  
1017 1071  typedef struct _MPI2_IEEE_SGE_SIMPLE64
1018 1072  {
1019 1073      U64                     Address;
↓ open down ↓ 9 lines elided ↑ open up ↑
1029 1083      MPI2_IEEE_SGE_SIMPLE32  Simple32;
1030 1084      MPI2_IEEE_SGE_SIMPLE64  Simple64;
1031 1085  } MPI2_IEEE_SGE_SIMPLE_UNION, MPI2_POINTER PTR_MPI2_IEEE_SGE_SIMPLE_UNION,
1032 1086    Mpi2IeeeSgeSimpleUnion_t, MPI2_POINTER pMpi2IeeeSgeSimpleUnion_t;
1033 1087  
1034 1088  
1035 1089  /****************************************************************************
1036 1090  *  IEEE Chain Element structures
1037 1091  ****************************************************************************/
1038 1092  
     1093 +/* MPI2_IEEE_SGE_CHAIN32 is for MPI v2.0 products only */
1039 1094  typedef MPI2_IEEE_SGE_SIMPLE32  MPI2_IEEE_SGE_CHAIN32;
1040 1095  
     1096 +/* MPI2_IEEE_SGE_CHAIN64 is for MPI v2.0 products only */
1041 1097  typedef MPI2_IEEE_SGE_SIMPLE64  MPI2_IEEE_SGE_CHAIN64;
1042 1098  
1043 1099  typedef union _MPI2_IEEE_SGE_CHAIN_UNION
1044 1100  {
1045 1101      MPI2_IEEE_SGE_CHAIN32   Chain32;
1046 1102      MPI2_IEEE_SGE_CHAIN64   Chain64;
1047 1103  } MPI2_IEEE_SGE_CHAIN_UNION, MPI2_POINTER PTR_MPI2_IEEE_SGE_CHAIN_UNION,
1048 1104    Mpi2IeeeSgeChainUnion_t, MPI2_POINTER pMpi2IeeeSgeChainUnion_t;
1049 1105  
     1106 +/* MPI25_IEEE_SGE_CHAIN64 is for MPI v2.5 products only */
     1107 +typedef struct _MPI25_IEEE_SGE_CHAIN64
     1108 +{
     1109 +    U64                     Address;
     1110 +    U32                     Length;
     1111 +    U16                     Reserved1;
     1112 +    U8                      NextChainOffset;
     1113 +    U8                      Flags;
     1114 +} MPI25_IEEE_SGE_CHAIN64, MPI2_POINTER PTR_MPI25_IEEE_SGE_CHAIN64,
     1115 +  Mpi25IeeeSgeChain64_t, MPI2_POINTER pMpi25IeeeSgeChain64_t;
     1116 +
1050 1117  
1051 1118  /****************************************************************************
1052 1119  *  All IEEE SGE types union
1053 1120  ****************************************************************************/
1054 1121  
     1122 +/* MPI2_IEEE_SGE_UNION is for MPI v2.0 products only */
1055 1123  typedef struct _MPI2_IEEE_SGE_UNION
1056 1124  {
1057 1125      union
1058 1126      {
1059 1127          MPI2_IEEE_SGE_SIMPLE_UNION  Simple;
1060 1128          MPI2_IEEE_SGE_CHAIN_UNION   Chain;
1061 1129      } u;
1062 1130  } MPI2_IEEE_SGE_UNION, MPI2_POINTER PTR_MPI2_IEEE_SGE_UNION,
1063 1131    Mpi2IeeeSgeUnion_t, MPI2_POINTER pMpi2IeeeSgeUnion_t;
1064 1132  
1065 1133  
1066 1134  /****************************************************************************
     1135 +*  IEEE SGE union for IO SGL's
     1136 +****************************************************************************/
     1137 +
     1138 +typedef union _MPI25_SGE_IO_UNION
     1139 +{
     1140 +    MPI2_IEEE_SGE_SIMPLE64      IeeeSimple;
     1141 +    MPI25_IEEE_SGE_CHAIN64      IeeeChain;
     1142 +} MPI25_SGE_IO_UNION, MPI2_POINTER PTR_MPI25_SGE_IO_UNION,
     1143 +  Mpi25SGEIOUnion_t, MPI2_POINTER pMpi25SGEIOUnion_t;
     1144 +
     1145 +
     1146 +/****************************************************************************
1067 1147  *  IEEE SGE field definitions and masks
1068 1148  ****************************************************************************/
1069 1149  
1070 1150  /* Flags field bit definitions */
1071 1151  
1072 1152  #define MPI2_IEEE_SGE_FLAGS_ELEMENT_TYPE_MASK   (0x80)
     1153 +#define MPI25_IEEE_SGE_FLAGS_END_OF_LIST        (0x40)
1073 1154  
1074 1155  #define MPI2_IEEE32_SGE_FLAGS_SHIFT             (24)
1075 1156  
1076 1157  #define MPI2_IEEE32_SGE_LENGTH_MASK             (0x00FFFFFF)
1077 1158  
1078 1159  /* Element Type */
1079 1160  
1080 1161  #define MPI2_IEEE_SGE_FLAGS_SIMPLE_ELEMENT      (0x00)
1081 1162  #define MPI2_IEEE_SGE_FLAGS_CHAIN_ELEMENT       (0x80)
1082 1163  
1083 1164  /* Data Location Address Space */
1084 1165  
1085 1166  #define MPI2_IEEE_SGE_FLAGS_ADDR_MASK           (0x03)
1086      -#define MPI2_IEEE_SGE_FLAGS_SYSTEM_ADDR         (0x00)
1087      -#define MPI2_IEEE_SGE_FLAGS_IOCDDR_ADDR         (0x01)
     1167 +#define MPI2_IEEE_SGE_FLAGS_SYSTEM_ADDR         (0x00) /* IEEE Simple Element only */
     1168 +#define MPI2_IEEE_SGE_FLAGS_IOCDDR_ADDR         (0x01) /* IEEE Simple Element only */
1088 1169  #define MPI2_IEEE_SGE_FLAGS_IOCPLB_ADDR         (0x02)
1089      -#define MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR      (0x03)
     1170 +#define MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR      (0x03) /* IEEE Simple Element only */
     1171 +#define MPI2_IEEE_SGE_FLAGS_SYSTEMPLBCPI_ADDR   (0x03) /* IEEE Chain Element only */
1090 1172  
1091 1173  
1092 1174  /****************************************************************************
1093 1175  *  IEEE SGE operation Macros
1094 1176  ****************************************************************************/
1095 1177  
1096 1178  /* SIMPLE FlagsLength manipulations... */
1097 1179  #define MPI2_IEEE32_SGE_SET_FLAGS(f)     ((U32)(f) << MPI2_IEEE32_SGE_FLAGS_SHIFT)
1098 1180  #define MPI2_IEEE32_SGE_GET_FLAGS(f)     (((f) & ~MPI2_IEEE32_SGE_LENGTH_MASK) >> MPI2_IEEE32_SGE_FLAGS_SHIFT)
1099 1181  #define MPI2_IEEE32_SGE_LENGTH(f)        ((f) & MPI2_IEEE32_SGE_LENGTH_MASK)
↓ open down ↓ 59 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX