Print this page
NEX-19691 Unsuccessful mpt_sas IOC reset leads to the panic in no I/O to the pool - days later
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
NEX-20282 Add disk target queue depth tunable to mpt_sas
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
9048 mpt_sas should not require targets to send SEP messages
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: Gordon Ross <gwr@nexenta.com>
NEX-14838 Support 24 port version of SAS adapters
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
NEX-2100 vmem_hash_delete(ffffff5b5dee0000, 0, 1): bad free
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Marcel Telka <marcel@telka.sk>
NEX-3717 mptsas doesn't handle timeouts in mptsas_get_sata_guid()
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-2103 12G mpt_sas needs additional minor enhancements
Revert OS-73 do not do IO complettions in the ISR
NEX-1889 mpt_sas should support 12G HBAs
4500 mptsas_hash_traverse() is unsafe, leads to missing devices
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Approved by: Albert Lee <trisk@nexenta.com>
backout 4500 mptsas_hash_traverse() is unsafe, leads to missing devices
4500 mptsas_hash_traverse() is unsafe, leads to missing devices
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Approved by: Albert Lee <trisk@nexenta.com>
OS-73 do not do IO complettions in the ISR
OS-61 Need ability for fault injection in mptsas
OS-60 mptsas watchdog resolution considered way to long for accurate CMD timeouts.
OS-59 remove automated target removal mechanism from mpt_sas.
re #9517 rb4120 After single disk fault patch installed single disk fault still causes process hangs
re #8346 rb2639 KT disk failures
re #9636 rb2836 - mpt_sas should attempt an MUR reset at attach time.
--HG--
branch : stable-4.0
re #9636 rb2836 - mpt_sas should attempt an MUR reset at attach time.
re #6530 mpt_sas crash when more than 1 Initiator involved - ie HA

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h
          +++ new/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_var.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  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   23   * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
       24 + * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
  25   25   * Copyright (c) 2017, Joyent, Inc.
  26   26   * Copyright (c) 2014, Tegile Systems Inc. All rights reserved.
  27   27   */
  28   28  
  29   29  /*
  30   30   * Copyright (c) 2000 to 2010, LSI Corporation.
  31   31   * All rights reserved.
  32   32   *
  33   33   * Redistribution and use in source and binary forms of all code within
  34   34   * this file that is exclusively owned by LSI, with or without
↓ open down ↓ 35 lines elided ↑ open up ↑
  70   70  extern "C" {
  71   71  #endif
  72   72  
  73   73  /*
  74   74   * Compile options
  75   75   */
  76   76  #ifdef DEBUG
  77   77  #define MPTSAS_DEBUG            /* turn on debugging code */
  78   78  #endif  /* DEBUG */
  79   79  
       80 +
       81 +#if defined(DEBUG) || lint
       82 +#define MPTSAS_FAULTINJECTION
       83 +#endif
       84 +
  80   85  #define MPTSAS_INITIAL_SOFT_SPACE       4
  81   86  
  82   87  /*
  83   88   * Note below macro definition and data type definition
  84   89   * are used for phy mask handling, it should be changed
  85   90   * simultaneously.
  86   91   */
  87   92  #define MPTSAS_MAX_PHYS         24
  88   93  typedef uint32_t                mptsas_phymask_t;
  89   94  
↓ open down ↓ 105 lines elided ↑ open up ↑
 195  200   * WWID provided by LSI firmware is generated by firmware but the WWID is not
 196  201   * IEEE NAA standard format, OBP has no chance to distinguish format of unit
 197  202   * address. According LSI's confirmation, the top nibble of RAID WWID is
 198  203   * meanless, so the consensus between Solaris and OBP is to replace top nibble
 199  204   * of WWID provided by LSI to "3" always to hint OBP that this is a RAID WWID
 200  205   * format unit address.
 201  206   */
 202  207  #define MPTSAS_RAID_WWID(wwid) \
 203  208          ((wwid & 0x0FFFFFFFFFFFFFFF) | 0x3000000000000000)
 204  209  
      210 +TAILQ_HEAD(mptsas_active_cmdq, mptsas_cmd);
      211 +typedef struct mptsas_active_cmdq mptsas_active_cmdq_t;
      212 +
 205  213  typedef struct mptsas_target_addr {
 206  214          uint64_t mta_wwn;
 207  215          mptsas_phymask_t mta_phymask;
 208  216  } mptsas_target_addr_t;
 209  217  
 210      -TAILQ_HEAD(mptsas_active_cmdq, mptsas_cmd);
 211      -typedef struct mptsas_active_cmdq mptsas_active_cmdq_t;
 212      -
 213  218  typedef struct mptsas_target {
 214  219                  mptsas_target_addr_t    m_addr;
 215  220                  refhash_link_t          m_link;
 216  221                  uint8_t                 m_dr_flag;
 217  222                  uint16_t                m_devhdl;
 218  223                  uint32_t                m_deviceinfo;
 219  224                  uint8_t                 m_phynum;
 220  225                  uint32_t                m_dups;
 221  226                  mptsas_active_cmdq_t    m_active_cmdq;
 222  227                  int32_t                 m_t_throttle;
 223  228                  int32_t                 m_t_ncmds;
 224  229                  int32_t                 m_reset_delay;
 225  230                  int32_t                 m_t_nwait;
 226  231  
 227  232                  uint16_t                m_qfull_retry_interval;
 228  233                  uint8_t                 m_qfull_retries;
 229  234                  uint16_t                m_io_flags;
 230  235                  uint16_t                m_enclosure;
 231  236                  uint16_t                m_slot_num;
 232  237                  uint32_t                m_tgt_unconfigured;
 233      -                uint8_t                 m_led_status;
 234      -                uint8_t                 m_scsi_req_desc_type;
 235      -
 236  238  } mptsas_target_t;
 237  239  
 238  240  /*
 239  241   * If you change this structure, be sure that mptsas_smp_target_copy()
 240  242   * does the right thing.
 241  243   */
 242  244  typedef struct mptsas_smp {
 243  245          mptsas_target_addr_t    m_addr;
 244  246          refhash_link_t          m_link;
 245  247          uint16_t                m_devhdl;
↓ open down ↓ 3 lines elided ↑ open up ↑
 249  251  } mptsas_smp_t;
 250  252  
 251  253  /*
 252  254   * This represents a single enclosure. Targets point to an enclosure through
 253  255   * their m_enclosure member.
 254  256   */
 255  257  typedef struct mptsas_enclosure {
 256  258          list_node_t     me_link;
 257  259          uint16_t        me_enchdl;
 258  260          uint16_t        me_flags;
      261 +        uint16_t        me_nslots;
      262 +        uint16_t        me_fslot;
      263 +        uint8_t         *me_slotleds;
 259  264  } mptsas_enclosure_t;
 260  265  
 261  266  typedef struct mptsas_cache_frames {
 262  267          ddi_dma_handle_t m_dma_hdl;
 263  268          ddi_acc_handle_t m_acc_hdl;
 264  269          caddr_t m_frames_addr;
 265  270          uint64_t m_phys_addr;
 266  271  } mptsas_cache_frames_t;
 267  272  
 268  273  typedef struct  mptsas_cmd {
↓ open down ↓ 506 lines elided ↑ open up ↑
 775  780          /*
 776  781           * qfull handling
 777  782           */
 778  783          timeout_id_t    m_restart_cmd_timeid;
 779  784  
 780  785          /*
 781  786           * scsi reset delay per bus
 782  787           */
 783  788          uint_t          m_scsi_reset_delay;
 784  789  
      790 +        /*
      791 +         *  Tuneable for the throttle control
      792 +         */
      793 +        uint_t          m_max_tune_throttle;
      794 +
 785  795          int             m_pm_idle_delay;
 786  796  
 787  797          uchar_t         m_polled_intr;  /* intr was polled. */
 788  798          uchar_t         m_suspended;    /* true if driver is suspended */
 789  799  
 790  800          struct kmem_cache *m_kmem_cache;
 791  801          struct kmem_cache *m_cache_frames;
 792  802  
 793  803          /*
 794  804           * hba options.
↓ open down ↓ 15 lines elided ↑ open up ↑
 810  820          ddi_device_acc_attr_t   m_dev_acc_attr;
 811  821          ddi_device_acc_attr_t   m_reg_acc_attr;
 812  822  
 813  823          /*
 814  824           * request/reply variables
 815  825           */
 816  826          caddr_t         m_req_frame;
 817  827          uint64_t        m_req_frame_dma_addr;
 818  828          caddr_t         m_req_sense;
 819  829          caddr_t         m_extreq_sense;
 820      -        uint_t          m_extreq_sense_refcount;
 821      -        kcondvar_t      m_extreq_sense_refcount_cv;
 822  830          uint64_t        m_req_sense_dma_addr;
 823  831          caddr_t         m_reply_frame;
 824  832          uint64_t        m_reply_frame_dma_addr;
 825  833          caddr_t         m_free_queue;
 826  834          uint64_t        m_free_queue_dma_addr;
 827  835          caddr_t         m_post_queue;
 828  836          uint64_t        m_post_queue_dma_addr;
 829  837          struct map      *m_erqsense_map;
 830  838  
 831  839          m_replyh_arg_t *m_replyh_args;
↓ open down ↓ 112 lines elided ↑ open up ↑
 944  952          /*
 945  953           * Is HBA processing a diag reset?
 946  954           */
 947  955          uint8_t                 m_in_reset;
 948  956  
 949  957          /*
 950  958           * per instance cmd data structures for task management cmds
 951  959           */
 952  960          m_event_struct_t        m_event_task_mgmt;      /* must be last */
 953  961                                                          /* ... scsi_pkt_size */
      962 +
      963 +#ifdef MPTSAS_FAULTINJECTION
      964 +        struct mptsas_active_cmdq  m_fminj_cmdq;
      965 +#endif
 954  966  } mptsas_t;
 955  967  #define MPTSAS_SIZE     (sizeof (struct mptsas) - \
 956  968                          sizeof (struct scsi_pkt) + scsi_pkt_size())
 957  969  /*
 958  970   * Only one of below two conditions is satisfied, we
 959  971   * think the target is associated to the iport and
 960  972   * allow call into mptsas_probe_lun().
 961  973   * 1. physicalsport == physport
 962  974   * 2. (phymask & (1 << physport)) == 0
 963  975   * The condition #2 is because LSI uses lowest PHY
↓ open down ↓ 284 lines elided ↑ open up ↑
1248 1260   * Ioc reset return values
1249 1261   */
1250 1262  #define MPTSAS_RESET_FAIL       -1
1251 1263  #define MPTSAS_NO_RESET         0
1252 1264  #define MPTSAS_SUCCESS_HARDRESET        1
1253 1265  #define MPTSAS_SUCCESS_MUR      2
1254 1266  
1255 1267  /*
1256 1268   * throttle support.
1257 1269   */
1258      -#define MAX_THROTTLE    32
     1270 +
     1271 +#define THROTTLE_HI     4096
     1272 +#define THROTTLE_LO     32
     1273 +#define MAX_THROTTLE THROTTLE_LO
1259 1274  #define HOLD_THROTTLE   0
1260 1275  #define DRAIN_THROTTLE  -1
1261 1276  #define QFULL_THROTTLE  -2
1262 1277  
1263 1278  /*
1264 1279   * Passthrough/config request flags
1265 1280   */
1266 1281  #define MPTSAS_DATA_ALLOCATED           0x0001
1267 1282  #define MPTSAS_DATAOUT_ALLOCATED        0x0002
1268 1283  #define MPTSAS_REQUEST_POOL_CMD         0x0004
↓ open down ↓ 211 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX