Print this page
NEX-1774 mptsas error stats are always zero
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Steve Peng <steve.peng@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas_smhba.c
          +++ new/usr/src/uts/common/io/scsi/adapters/mpt_sas/mptsas_smhba.c
↓ open down ↓ 337 lines elided ↑ open up ↑
 338  338                          if (phyp->phy_stats == NULL) {
 339  339                                  mutex_exit(&phyp->phy_mutex);
 340  340                                  mptsas_log(mpt, CE_WARN,
 341  341                                      "%s: Failed to create %s kstats", __func__,
 342  342                                      ks_name);
 343  343                                  continue;
 344  344                          }
 345  345  
 346  346                          ps = (sas_phy_stats_t *)phyp->phy_stats->ks_data;
 347  347  
 348      -                        kstat_named_init(&ps->seconds_since_last_reset,
 349      -                            "SecondsSinceLastReset", KSTAT_DATA_ULONGLONG);
 350      -                        kstat_named_init(&ps->tx_frames,
 351      -                            "TxFrames", KSTAT_DATA_ULONGLONG);
 352      -                        kstat_named_init(&ps->rx_frames,
 353      -                            "RxFrames", KSTAT_DATA_ULONGLONG);
 354      -                        kstat_named_init(&ps->tx_words,
 355      -                            "TxWords", KSTAT_DATA_ULONGLONG);
 356      -                        kstat_named_init(&ps->rx_words,
 357      -                            "RxWords", KSTAT_DATA_ULONGLONG);
 358  348                          kstat_named_init(&ps->invalid_dword_count,
 359  349                              "InvalidDwordCount", KSTAT_DATA_ULONGLONG);
 360  350                          kstat_named_init(&ps->running_disparity_error_count,
 361  351                              "RunningDisparityErrorCount", KSTAT_DATA_ULONGLONG);
 362  352                          kstat_named_init(&ps->loss_of_dword_sync_count,
 363  353                              "LossofDwordSyncCount", KSTAT_DATA_ULONGLONG);
 364  354                          kstat_named_init(&ps->phy_reset_problem_count,
 365  355                              "PhyResetProblemCount", KSTAT_DATA_ULONGLONG);
 366  356  
 367  357                          phyp->phy_stats->ks_private = phyp;
↓ open down ↓ 166 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX