Print this page
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_sas.h
          +++ new/usr/src/uts/common/sys/scsi/adapters/mpt_sas3/mpi/mpi2_sas.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 ↓ 9 lines elided ↑ open up ↑
  44   43   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  45   44   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  46   45   * DAMAGE.
  47   46   */
  48   47  
  49   48  /*
  50   49   *           Name:  mpi2_sas.h
  51   50   *          Title:  MPI Serial Attached SCSI structures and definitions
  52   51   *  Creation Date:  February 9, 2007
  53   52   *
  54      - *  mpi2.h Version:  02.00.02
       53 + *  mpi2_sas.h Version:  02.00.xx
       54 + *
       55 + *  NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
       56 + *        prefix are for use only on MPI v2.5 products, and must not be used
       57 + *        with MPI v2.0 products. Unless otherwise noted, names beginning with
       58 + *        MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
  55   59   *
  56   60   *  Version History
  57   61   *  ---------------
  58   62   *
  59   63   *  Date      Version   Description
  60   64   *  --------  --------  ------------------------------------------------------
  61   65   *  04-30-07  02.00.00  Corresponds to Fusion-MPT MPI Specification Rev A.
  62   66   *  06-26-07  02.00.01  Added Clear All Persistent Operation to SAS IO Unit
  63   67   *                      Control Request.
  64   68   *  10-02-08  02.00.02  Added Set IOC Parameter Operation to SAS IO Unit Control
  65   69   *                      Request.
       70 + *  10-28-09  02.00.03  Changed the type of SGL in MPI2_SATA_PASSTHROUGH_REQUEST
       71 + *                      to MPI2_SGE_IO_UNION since it supports chained SGLs.
       72 + *  05-12-10  02.00.04  Modified some comments.
       73 + *  08-11-10  02.00.05  Added NCQ operations to SAS IO Unit Control.
  66   74   *  --------------------------------------------------------------------------
  67   75   */
  68   76  
  69   77  #ifndef MPI2_SAS_H
  70   78  #define MPI2_SAS_H
  71   79  
  72   80  /*
  73   81   * Values for SASStatus.
  74   82   */
  75   83  #define MPI2_SASSTATUS_SUCCESS                          (0x00)
↓ open down ↓ 54 lines elided ↑ open up ↑
 130  138  ****************************************************************************/
 131  139  
 132  140  /* SMP Passthrough Request Message */
 133  141  typedef struct _MPI2_SMP_PASSTHROUGH_REQUEST
 134  142  {
 135  143      U8                      PassthroughFlags;   /* 0x00 */
 136  144      U8                      PhysicalPort;       /* 0x01 */
 137  145      U8                      ChainOffset;        /* 0x02 */
 138  146      U8                      Function;           /* 0x03 */
 139  147      U16                     RequestDataLength;  /* 0x04 */
 140      -    U8                      SGLFlags;           /* 0x06 */
      148 +    U8                      SGLFlags;           /* 0x06 */ /* MPI v2.0 only. Reserved on MPI v2.5. */
 141  149      U8                      MsgFlags;           /* 0x07 */
 142  150      U8                      VP_ID;              /* 0x08 */
 143  151      U8                      VF_ID;              /* 0x09 */
 144  152      U16                     Reserved1;          /* 0x0A */
 145  153      U32                     Reserved2;          /* 0x0C */
 146  154      U64                     SASAddress;         /* 0x10 */
 147  155      U32                     Reserved3;          /* 0x18 */
 148  156      U32                     Reserved4;          /* 0x1C */
 149      -    MPI2_SIMPLE_SGE_UNION   SGL;                /* 0x20 */
      157 +    MPI2_SIMPLE_SGE_UNION   SGL;                /* 0x20 */ /* MPI v2.5: IEEE Simple 64 elements only */
 150  158  } MPI2_SMP_PASSTHROUGH_REQUEST, MPI2_POINTER PTR_MPI2_SMP_PASSTHROUGH_REQUEST,
 151  159    Mpi2SmpPassthroughRequest_t, MPI2_POINTER pMpi2SmpPassthroughRequest_t;
 152  160  
 153  161  /* values for PassthroughFlags field */
 154  162  #define MPI2_SMP_PT_REQ_PT_FLAGS_IMMEDIATE      (0x80)
 155  163  
 156      -/* values for SGLFlags field are in the SGL section of mpi2.h */
      164 +/* MPI v2.0: use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 157  165  
 158  166  
 159  167  /* SMP Passthrough Reply Message */
 160  168  typedef struct _MPI2_SMP_PASSTHROUGH_REPLY
 161  169  {
 162  170      U8                      PassthroughFlags;   /* 0x00 */
 163  171      U8                      PhysicalPort;       /* 0x01 */
 164  172      U8                      MsgLength;          /* 0x02 */
 165  173      U8                      Function;           /* 0x03 */
 166  174      U16                     ResponseDataLength; /* 0x04 */
↓ open down ↓ 21 lines elided ↑ open up ↑
 188  196  *  SATA Passthrough messages
 189  197  ****************************************************************************/
 190  198  
 191  199  /* SATA Passthrough Request Message */
 192  200  typedef struct _MPI2_SATA_PASSTHROUGH_REQUEST
 193  201  {
 194  202      U16                     DevHandle;          /* 0x00 */
 195  203      U8                      ChainOffset;        /* 0x02 */
 196  204      U8                      Function;           /* 0x03 */
 197  205      U16                     PassthroughFlags;   /* 0x04 */
 198      -    U8                      SGLFlags;           /* 0x06 */
      206 +    U8                      SGLFlags;           /* 0x06 */ /* MPI v2.0 only. Reserved on MPI v2.5. */
 199  207      U8                      MsgFlags;           /* 0x07 */
 200  208      U8                      VP_ID;              /* 0x08 */
 201  209      U8                      VF_ID;              /* 0x09 */
 202  210      U16                     Reserved1;          /* 0x0A */
 203  211      U32                     Reserved2;          /* 0x0C */
 204  212      U32                     Reserved3;          /* 0x10 */
 205  213      U32                     Reserved4;          /* 0x14 */
 206  214      U32                     DataLength;         /* 0x18 */
 207  215      U8                      CommandFIS[20];     /* 0x1C */
 208      -    MPI2_SIMPLE_SGE_UNION   SGL;                /* 0x20 */
      216 +    MPI2_SGE_IO_UNION       SGL;                /* 0x30 */ /* MPI v2.5: IEEE 64 elements only */
 209  217  } MPI2_SATA_PASSTHROUGH_REQUEST, MPI2_POINTER PTR_MPI2_SATA_PASSTHROUGH_REQUEST,
 210  218    Mpi2SataPassthroughRequest_t, MPI2_POINTER pMpi2SataPassthroughRequest_t;
 211  219  
 212  220  /* values for PassthroughFlags field */
 213  221  #define MPI2_SATA_PT_REQ_PT_FLAGS_EXECUTE_DIAG      (0x0100)
 214  222  #define MPI2_SATA_PT_REQ_PT_FLAGS_DMA               (0x0020)
 215  223  #define MPI2_SATA_PT_REQ_PT_FLAGS_PIO               (0x0010)
 216  224  #define MPI2_SATA_PT_REQ_PT_FLAGS_UNSPECIFIED_VU    (0x0004)
 217  225  #define MPI2_SATA_PT_REQ_PT_FLAGS_WRITE             (0x0002)
 218  226  #define MPI2_SATA_PT_REQ_PT_FLAGS_READ              (0x0001)
 219  227  
 220      -/* values for SGLFlags field are in the SGL section of mpi2.h */
      228 +/* MPI v2.0: use MPI2_SGLFLAGS_ defines from mpi2.h for the SGLFlags field */
 221  229  
 222  230  
 223  231  /* SATA Passthrough Reply Message */
 224  232  typedef struct _MPI2_SATA_PASSTHROUGH_REPLY
 225  233  {
 226  234      U16                     DevHandle;          /* 0x00 */
 227  235      U8                      MsgLength;          /* 0x02 */
 228  236      U8                      Function;           /* 0x03 */
 229  237      U16                     PassthroughFlags;   /* 0x04 */
 230  238      U8                      SGLFlags;           /* 0x06 */
↓ open down ↓ 50 lines elided ↑ open up ↑
 281  289  #define MPI2_SAS_OP_CLEAR_ALL_PERSISTENT        (0x02)
 282  290  #define MPI2_SAS_OP_PHY_LINK_RESET              (0x06)
 283  291  #define MPI2_SAS_OP_PHY_HARD_RESET              (0x07)
 284  292  #define MPI2_SAS_OP_PHY_CLEAR_ERROR_LOG         (0x08)
 285  293  #define MPI2_SAS_OP_SEND_PRIMITIVE              (0x0A)
 286  294  #define MPI2_SAS_OP_FORCE_FULL_DISCOVERY        (0x0B)
 287  295  #define MPI2_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL (0x0C)
 288  296  #define MPI2_SAS_OP_REMOVE_DEVICE               (0x0D)
 289  297  #define MPI2_SAS_OP_LOOKUP_MAPPING              (0x0E)
 290  298  #define MPI2_SAS_OP_SET_IOC_PARAMETER           (0x0F)
      299 +#define MPI25_SAS_OP_ENABLE_FP_DEVICE           (0x10)
      300 +#define MPI25_SAS_OP_DISABLE_FP_DEVICE          (0x11)
      301 +#define MPI25_SAS_OP_ENABLE_FP_ALL              (0x12)
      302 +#define MPI25_SAS_OP_DISABLE_FP_ALL             (0x13)
      303 +#define MPI2_SAS_OP_DEV_ENABLE_NCQ              (0x14)
      304 +#define MPI2_SAS_OP_DEV_DISABLE_NCQ             (0x15)
 291  305  #define MPI2_SAS_OP_PRODUCT_SPECIFIC_MIN        (0x80)
 292  306  
 293  307  /* values for the PrimFlags field */
 294  308  #define MPI2_SAS_PRIMFLAGS_SINGLE               (0x08)
 295  309  #define MPI2_SAS_PRIMFLAGS_TRIPLE               (0x02)
 296  310  #define MPI2_SAS_PRIMFLAGS_REDUNDANT            (0x01)
 297  311  
 298  312  /* values for the LookupMethod field */
 299  313  #define MPI2_SAS_LOOKUP_METHOD_SAS_ADDRESS          (0x01)
 300  314  #define MPI2_SAS_LOOKUP_METHOD_SAS_ENCLOSURE_SLOT   (0x02)
↓ open down ↓ 27 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX