Print this page
7351 NVMe driver sporadically lost track of completed I/O request, which
leads to zpool hanging and machine panic.


  81         size_t nq_nentry;
  82 
  83         nvme_dma_t *nq_sqdma;
  84         nvme_sqe_t *nq_sq;
  85         uint_t nq_sqhead;
  86         uint_t nq_sqtail;
  87         uintptr_t nq_sqtdbl;
  88 
  89         nvme_dma_t *nq_cqdma;
  90         nvme_cqe_t *nq_cq;
  91         uint_t nq_cqhead;
  92         uint_t nq_cqtail;
  93         uintptr_t nq_cqhdbl;
  94 
  95         nvme_cmd_t **nq_cmd;
  96         uint16_t nq_next_cmd;
  97         uint_t nq_active_cmds;
  98         int nq_phase;
  99 
 100         kmutex_t nq_mutex;



 101 };
 102 
 103 struct nvme {
 104         dev_info_t *n_dip;
 105         int n_progress;
 106 
 107         caddr_t n_regs;
 108         ddi_acc_handle_t n_regh;
 109 
 110         kmem_cache_t *n_cmd_cache;
 111 
 112         size_t n_inth_sz;
 113         ddi_intr_handle_t *n_inth;
 114         int n_intr_cnt;
 115         uint_t n_intr_pri;
 116         int n_intr_cap;
 117         int n_intr_type;
 118         int n_intr_types;

 119 
 120         char *n_product;
 121         char *n_vendor;
 122 
 123         boolean_t n_dead;
 124         boolean_t n_strict_version;
 125         boolean_t n_ignore_unknown_vendor_status;
 126         uint32_t n_admin_queue_len;
 127         uint32_t n_io_queue_len;
 128         uint16_t n_async_event_limit;
 129         uint16_t n_abort_command_limit;
 130         uint64_t n_max_data_transfer_size;
 131         boolean_t n_volatile_write_cache_enabled;
 132         int n_error_log_len;
 133 
 134         int n_nssr_supported;
 135         int n_doorbell_stride;
 136         int n_timeout;
 137         int n_arbitration_mechanisms;
 138         int n_cont_queues_reqd;




  81         size_t nq_nentry;
  82 
  83         nvme_dma_t *nq_sqdma;
  84         nvme_sqe_t *nq_sq;
  85         uint_t nq_sqhead;
  86         uint_t nq_sqtail;
  87         uintptr_t nq_sqtdbl;
  88 
  89         nvme_dma_t *nq_cqdma;
  90         nvme_cqe_t *nq_cq;
  91         uint_t nq_cqhead;
  92         uint_t nq_cqtail;
  93         uintptr_t nq_cqhdbl;
  94 
  95         nvme_cmd_t **nq_cmd;
  96         uint16_t nq_next_cmd;
  97         uint_t nq_active_cmds;
  98         int nq_phase;
  99 
 100         kmutex_t nq_mutex;
 101         hrtime_t nq_ts;
 102         list_node_t nq_list_node;
 103         nvme_t *nq_nvme;
 104 };
 105 
 106 struct nvme {
 107         dev_info_t *n_dip;
 108         int n_progress;
 109 
 110         caddr_t n_regs;
 111         ddi_acc_handle_t n_regh;
 112 
 113         kmem_cache_t *n_cmd_cache;
 114 
 115         size_t n_inth_sz;
 116         ddi_intr_handle_t *n_inth;
 117         int n_intr_cnt;
 118         uint_t n_intr_pri;
 119         int n_intr_cap;
 120         int n_intr_type;
 121         int n_intr_types;
 122         int n_intr_timeouts;
 123 
 124         char *n_product;
 125         char *n_vendor;
 126 
 127         boolean_t n_dead;
 128         boolean_t n_strict_version;
 129         boolean_t n_ignore_unknown_vendor_status;
 130         uint32_t n_admin_queue_len;
 131         uint32_t n_io_queue_len;
 132         uint16_t n_async_event_limit;
 133         uint16_t n_abort_command_limit;
 134         uint64_t n_max_data_transfer_size;
 135         boolean_t n_volatile_write_cache_enabled;
 136         int n_error_log_len;
 137 
 138         int n_nssr_supported;
 139         int n_doorbell_stride;
 140         int n_timeout;
 141         int n_arbitration_mechanisms;
 142         int n_cont_queues_reqd;