Print this page
hg changesets 607a5b46a793..b706c96317c3
Fix ncpus for early boot config
Purge the ack to the interrupt before exiting mptsas_intr()
Changes from code review
Change some obvious references sas -> sas3.
Changes to enable driver to compile.
Header paths, object lists, etc.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/scsi/adapters/mpt_sas3/mptsas3_smhba.c
          +++ new/usr/src/uts/common/io/scsi/adapters/mpt_sas3/mptsas3_smhba.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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   24   * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
       25 + * Copyright (c) 2014, Tegile Systems Inc. All rights reserved.
  25   26   */
  26   27  /*
  27      - * This file contains SM-HBA support for MPT SAS driver
       28 + * This file contains SM-HBA support for MPT SAS3 driver
  28   29   */
  29   30  
  30   31  #if defined(lint) || defined(DEBUG)
  31   32  #define MPTSAS_DEBUG
  32   33  #endif
  33   34  
  34   35  /*
  35   36   * standard header files
  36   37   */
  37   38  #include <sys/note.h>
  38   39  #include <sys/scsi/scsi.h>
  39   40  #include <sys/pci.h>
  40   41  #include <sys/scsi/generic/sas.h>
  41   42  #include <sys/scsi/impl/scsi_sas.h>
  42   43  
  43   44  #pragma pack(1)
  44      -#include <sys/scsi/adapters/mpt_sas/mpi/mpi2_type.h>
  45      -#include <sys/scsi/adapters/mpt_sas/mpi/mpi2.h>
  46      -#include <sys/scsi/adapters/mpt_sas/mpi/mpi2_cnfg.h>
  47      -#include <sys/scsi/adapters/mpt_sas/mpi/mpi2_init.h>
  48      -#include <sys/scsi/adapters/mpt_sas/mpi/mpi2_ioc.h>
  49      -#include <sys/scsi/adapters/mpt_sas/mpi/mpi2_sas.h>
       45 +#include <sys/scsi/adapters/mpt_sas3/mpi/mpi2_type.h>
       46 +#include <sys/scsi/adapters/mpt_sas3/mpi/mpi2.h>
       47 +#include <sys/scsi/adapters/mpt_sas3/mpi/mpi2_cnfg.h>
       48 +#include <sys/scsi/adapters/mpt_sas3/mpi/mpi2_init.h>
       49 +#include <sys/scsi/adapters/mpt_sas3/mpi/mpi2_ioc.h>
       50 +#include <sys/scsi/adapters/mpt_sas3/mpi/mpi2_sas.h>
  50   51  #pragma pack()
  51   52  
  52   53  /*
  53   54   * private header files.
  54   55   */
  55      -#include <sys/scsi/adapters/mpt_sas/mptsas_var.h>
  56      -#include <sys/scsi/adapters/mpt_sas/mptsas_smhba.h>
       56 +#include <sys/scsi/adapters/mpt_sas3/mptsas3_var.h>
       57 +#include <sys/scsi/adapters/mpt_sas3/mptsas3_smhba.h>
  57   58  
  58   59  /*
  59   60   * SM - HBA statics
  60   61   */
  61   62  extern char *mptsas_driver_rev;
  62   63  
  63   64  static void mptsas_smhba_create_phy_props(nvlist_t **, smhba_info_t *, uint8_t,
  64   65      uint16_t *);
  65   66  static void mptsas_smhba_update_phy_props(mptsas_t *, dev_info_t *, nvlist_t **,
  66   67      uint8_t);
↓ open down ↓ 257 lines elided ↑ open up ↑
 324  325                                  continue;
 325  326                          }
 326  327  
 327  328                          ndata = (sizeof (sas_phy_stats_t)/
 328  329                              sizeof (kstat_named_t));
 329  330                          (void) snprintf(ks_name, sizeof (ks_name),
 330  331                              "%s.%llx.%d.%d", ddi_driver_name(dip),
 331  332                              (longlong_t)mpt->un.m_base_wwid,
 332  333                              ddi_get_instance(dip), i);
 333  334  
 334      -                        phyp->phy_stats = kstat_create("mptsas",
      335 +                        phyp->phy_stats = kstat_create("mptsas3",
 335  336                              ddi_get_instance(dip), ks_name, KSTAT_SAS_PHY_CLASS,
 336  337                              KSTAT_TYPE_NAMED, ndata, 0);
 337  338  
 338  339                          if (phyp->phy_stats == NULL) {
 339  340                                  mutex_exit(&phyp->phy_mutex);
 340  341                                  mptsas_log(mpt, CE_WARN,
 341  342                                      "%s: Failed to create %s kstats", __func__,
 342  343                                      ks_name);
 343  344                                  continue;
 344  345                          }
↓ open down ↓ 189 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX