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

@@ -19,11 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2017, Joyent, Inc.
  * Copyright (c) 2014, Tegile Systems Inc. All rights reserved.
  */
 
 /*

@@ -75,10 +75,15 @@
  */
 #ifdef DEBUG
 #define MPTSAS_DEBUG            /* turn on debugging code */
 #endif  /* DEBUG */
 
+
+#if defined(DEBUG) || lint
+#define MPTSAS_FAULTINJECTION
+#endif
+
 #define MPTSAS_INITIAL_SOFT_SPACE       4
 
 /*
  * Note below macro definition and data type definition
  * are used for phy mask handling, it should be changed

@@ -200,18 +205,18 @@
  * format unit address.
  */
 #define MPTSAS_RAID_WWID(wwid) \
         ((wwid & 0x0FFFFFFFFFFFFFFF) | 0x3000000000000000)
 
+TAILQ_HEAD(mptsas_active_cmdq, mptsas_cmd);
+typedef struct mptsas_active_cmdq mptsas_active_cmdq_t;
+
 typedef struct mptsas_target_addr {
         uint64_t mta_wwn;
         mptsas_phymask_t mta_phymask;
 } mptsas_target_addr_t;
 
-TAILQ_HEAD(mptsas_active_cmdq, mptsas_cmd);
-typedef struct mptsas_active_cmdq mptsas_active_cmdq_t;
-
 typedef struct mptsas_target {
                 mptsas_target_addr_t    m_addr;
                 refhash_link_t          m_link;
                 uint8_t                 m_dr_flag;
                 uint16_t                m_devhdl;

@@ -228,13 +233,10 @@
                 uint8_t                 m_qfull_retries;
                 uint16_t                m_io_flags;
                 uint16_t                m_enclosure;
                 uint16_t                m_slot_num;
                 uint32_t                m_tgt_unconfigured;
-                uint8_t                 m_led_status;
-                uint8_t                 m_scsi_req_desc_type;
-
 } mptsas_target_t;
 
 /*
  * If you change this structure, be sure that mptsas_smp_target_copy()
  * does the right thing.

@@ -254,10 +256,13 @@
  */
 typedef struct mptsas_enclosure {
         list_node_t     me_link;
         uint16_t        me_enchdl;
         uint16_t        me_flags;
+        uint16_t        me_nslots;
+        uint16_t        me_fslot;
+        uint8_t         *me_slotleds;
 } mptsas_enclosure_t;
 
 typedef struct mptsas_cache_frames {
         ddi_dma_handle_t m_dma_hdl;
         ddi_acc_handle_t m_acc_hdl;

@@ -780,10 +785,15 @@
         /*
          * scsi reset delay per bus
          */
         uint_t          m_scsi_reset_delay;
 
+        /*
+         *  Tuneable for the throttle control
+         */
+        uint_t          m_max_tune_throttle;
+
         int             m_pm_idle_delay;
 
         uchar_t         m_polled_intr;  /* intr was polled. */
         uchar_t         m_suspended;    /* true if driver is suspended */
 

@@ -815,12 +825,10 @@
          */
         caddr_t         m_req_frame;
         uint64_t        m_req_frame_dma_addr;
         caddr_t         m_req_sense;
         caddr_t         m_extreq_sense;
-        uint_t          m_extreq_sense_refcount;
-        kcondvar_t      m_extreq_sense_refcount_cv;
         uint64_t        m_req_sense_dma_addr;
         caddr_t         m_reply_frame;
         uint64_t        m_reply_frame_dma_addr;
         caddr_t         m_free_queue;
         uint64_t        m_free_queue_dma_addr;

@@ -949,10 +957,14 @@
         /*
          * per instance cmd data structures for task management cmds
          */
         m_event_struct_t        m_event_task_mgmt;      /* must be last */
                                                         /* ... scsi_pkt_size */
+
+#ifdef MPTSAS_FAULTINJECTION
+        struct mptsas_active_cmdq  m_fminj_cmdq;
+#endif
 } mptsas_t;
 #define MPTSAS_SIZE     (sizeof (struct mptsas) - \
                         sizeof (struct scsi_pkt) + scsi_pkt_size())
 /*
  * Only one of below two conditions is satisfied, we

@@ -1253,11 +1265,14 @@
 #define MPTSAS_SUCCESS_MUR      2
 
 /*
  * throttle support.
  */
-#define MAX_THROTTLE    32
+
+#define THROTTLE_HI     4096
+#define THROTTLE_LO     32
+#define MAX_THROTTLE THROTTLE_LO
 #define HOLD_THROTTLE   0
 #define DRAIN_THROTTLE  -1
 #define QFULL_THROTTLE  -2
 
 /*