Print this page
5719 Add support for LSI Fury adapters


  27  *    used to endorse or promote products derived from this software without
  28  *    specific prior written permission.
  29  *
  30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  33  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  34  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  35  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  36  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  37  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  38  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  39  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  40  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  41  * DAMAGE.
  42  */
  43 
  44 /*
  45  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  46  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.

  47  */
  48 
  49 #ifndef _MR_SAS_H_
  50 #define _MR_SAS_H_
  51 
  52 #ifdef  __cplusplus
  53 extern "C" {
  54 #endif
  55 
  56 #include <sys/scsi/scsi.h>
  57 #include "mr_sas_list.h"
  58 #include "ld_pd_map.h"
  59 
  60 /*
  61  * MegaRAID SAS2.0 Driver meta data
  62  */
  63 #define MRSAS_VERSION                           "6.503.00.00ILLUMOS"
  64 #define MRSAS_RELDATE                           "July 30, 2012"
  65 
  66 #define MRSAS_TRUE                              1


  78 #define MRSAS_GET_BOUNDARY_ALIGNED_LEN(len, new_len, boundary_len)  { \
  79         int rem; \
  80         rem = (len / boundary_len); \
  81         if ((rem * boundary_len) != len) { \
  82                 new_len = len + ((rem + 1) * boundary_len - len); \
  83         } else { \
  84                 new_len = len; \
  85         } \
  86 }
  87 
  88 
  89 /*
  90  * MegaRAID SAS2.0 supported controllers
  91  */
  92 #define PCI_DEVICE_ID_LSI_2108VDE               0x0078
  93 #define PCI_DEVICE_ID_LSI_2108V                 0x0079
  94 #define PCI_DEVICE_ID_LSI_SKINNY                0x0071
  95 #define PCI_DEVICE_ID_LSI_SKINNY_NEW            0x0073
  96 #define PCI_DEVICE_ID_LSI_TBOLT                 0x005b
  97 #define PCI_DEVICE_ID_LSI_INVADER               0x005d

  98 
  99 /*
 100  * Register Index for 2108 Controllers.
 101  */
 102 #define REGISTER_SET_IO_2108                    (2)
 103 
 104 #define MRSAS_MAX_SGE_CNT                       0x50
 105 #define MRSAS_APP_RESERVED_CMDS                 32
 106 #define MRSAS_APP_MIN_RESERVED_CMDS             4
 107 
 108 #define MRSAS_IOCTL_DRIVER                      0x12341234
 109 #define MRSAS_IOCTL_FIRMWARE                    0x12345678
 110 #define MRSAS_IOCTL_AEN                         0x87654321
 111 
 112 #define MRSAS_1_SECOND                          1000000
 113 
 114 #ifdef PDSUPPORT
 115 
 116 #define UNCONFIGURED_GOOD                       0x0
 117 #define PD_SYSTEM                               0x40




  27  *    used to endorse or promote products derived from this software without
  28  *    specific prior written permission.
  29  *
  30  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  33  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  34  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  35  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  36  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  37  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  38  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  39  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  40  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  41  * DAMAGE.
  42  */
  43 
  44 /*
  45  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  46  * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  47  * Copyright 2015 Garrett D'Amore <garrett@damore.org>
  48  */
  49 
  50 #ifndef _MR_SAS_H_
  51 #define _MR_SAS_H_
  52 
  53 #ifdef  __cplusplus
  54 extern "C" {
  55 #endif
  56 
  57 #include <sys/scsi/scsi.h>
  58 #include "mr_sas_list.h"
  59 #include "ld_pd_map.h"
  60 
  61 /*
  62  * MegaRAID SAS2.0 Driver meta data
  63  */
  64 #define MRSAS_VERSION                           "6.503.00.00ILLUMOS"
  65 #define MRSAS_RELDATE                           "July 30, 2012"
  66 
  67 #define MRSAS_TRUE                              1


  79 #define MRSAS_GET_BOUNDARY_ALIGNED_LEN(len, new_len, boundary_len)  { \
  80         int rem; \
  81         rem = (len / boundary_len); \
  82         if ((rem * boundary_len) != len) { \
  83                 new_len = len + ((rem + 1) * boundary_len - len); \
  84         } else { \
  85                 new_len = len; \
  86         } \
  87 }
  88 
  89 
  90 /*
  91  * MegaRAID SAS2.0 supported controllers
  92  */
  93 #define PCI_DEVICE_ID_LSI_2108VDE               0x0078
  94 #define PCI_DEVICE_ID_LSI_2108V                 0x0079
  95 #define PCI_DEVICE_ID_LSI_SKINNY                0x0071
  96 #define PCI_DEVICE_ID_LSI_SKINNY_NEW            0x0073
  97 #define PCI_DEVICE_ID_LSI_TBOLT                 0x005b
  98 #define PCI_DEVICE_ID_LSI_INVADER               0x005d
  99 #define PCI_DEVICE_ID_LSI_FURY                  0x005f
 100 
 101 /*
 102  * Register Index for 2108 Controllers.
 103  */
 104 #define REGISTER_SET_IO_2108                    (2)
 105 
 106 #define MRSAS_MAX_SGE_CNT                       0x50
 107 #define MRSAS_APP_RESERVED_CMDS                 32
 108 #define MRSAS_APP_MIN_RESERVED_CMDS             4
 109 
 110 #define MRSAS_IOCTL_DRIVER                      0x12341234
 111 #define MRSAS_IOCTL_FIRMWARE                    0x12345678
 112 #define MRSAS_IOCTL_AEN                         0x87654321
 113 
 114 #define MRSAS_1_SECOND                          1000000
 115 
 116 #ifdef PDSUPPORT
 117 
 118 #define UNCONFIGURED_GOOD                       0x0
 119 #define PD_SYSTEM                               0x40