Print this page
    
NEX-3168 sasinfo does not know about 12gb sas
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/lib/smhba/common/smhbaapi.h
          +++ new/usr/src/lib/smhba/common/smhbaapi.h
   1    1  /*
   2    2   * ****************************************************************************
   3    3   *
   4    4   * Description
   5    5   *      smhbaapi.h - general header file for client
   6    6   *      and library developers
   7    7   *
   8    8   * License:
   9    9   *      The contents of this file are subject to the SNIA Public License
  10   10   *      Version 1.0 (the "License"); you may not use this file except in
  11   11   *      compliance with the License. You may obtain a copy of the License at
  12   12   *
  13   13   *      /http://www.snia.org/English/Resources/Code/OpenSource.html
  14   14   *
  15   15   *      Software distributed under the License is distributed on an "AS IS"
  16   16   *      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  17   17   *      the License for the specific language governing rights and limitations
  18   18   *      under the License.
  19   19   *
  20   20   * The Original Code for  SM-HBA API general header file
  21   21   *
  22   22   * The Initial Developer of the Original Code is:
  23   23   *      Benjamin F. Kuo, Troika Networks, Inc. (benk@troikanetworks.com)
  24   24   *
  25   25   * Contributor(s):
  26   26   *      Tuan Lam, QLogic Corp. (t_lam@qlc.com)
  27   27   *      Dan Willie, Emulex Corp. (Dan.Willie@emulex.com)
  28   28   *      Dixon Hutchinson, Legato Systems, Inc. (dhutchin@legato.com)
  29   29   *      David Dillard, VERITAS Software Corp. (david.dillard@veritas.com)
  30   30   *
  31   31   * ****************************************************************************
  32   32   *
  33   33   * Adding on SM-HBA related definitions.
  34   34   *
  35   35   * - Includes the original HBA API header.
  36   36   * - SMHBA_* interfaces and structures are defined.
  37   37   *
  38   38   * ****************************************************************************
  39   39   */
  40   40  /*
  41   41   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  42   42   * Use is subject to license terms.
  43   43   */
  44   44  
  45   45  #ifndef _SMHBAAPI_H_
  46   46  #define _SMHBAAPI_H_
  47   47  
  48   48  #ifdef __cplusplus
  49   49  extern "C" {
  50   50  #endif
  51   51  
  52   52  #include <hbaapi.h>
  53   53  
  54   54  /* Library version string */
  55   55  #define SMHBA_LIBVERSION 1
  56   56  
  57   57  /*
  58   58   * A SCSI function was requested at a time when issuing the requested command
  59   59   * would cause a SCSI overlapped command condition (see SAM-3)
  60   60   */
  61   61  #define HBA_STATUS_ERROR_TARGET_BUSY    30
  62   62  /* SM-HBA 6.2   Status Return Values */
  63   63  /* A call was made to HBA_FreeLibrary when no library was loaded */
  64   64  #define HBA_STATUS_ERROR_NOT_LOADED     31
  65   65  /* A call was made to HBA_LoadLibrary when a library was already loaded */
  66   66  #define HBA_STATUS_ERROR_ALREADY_LOADED 32
  67   67  /*
  68   68   * The Address Identifier specified in a call to HBA_SendRNIDV2
  69   69   * violates access control rules * for that call.
  70   70   */
  71   71  #define HBA_STATUS_ERROR_ILLEGAL_FCID   33
  72   72  #define HBA_STATUS_ERROR_NOT_ASCSIDEVICE    34
  73   73  #define HBA_STATUS_ERROR_INVALID_PROTOCOL_TYPE  35
  74   74  #define HBA_STATUS_ERROR_BAD_EVENT_TYPE 36
  75   75  
  76   76  
  77   77  /* SM-HBA 6.4.1.1 Port Type */
  78   78  #define HBA_PORTTYPE_SASDEVICE   30 /* SAS (SSP or STP) */
  79   79  #define HBA_PORTTYPE_SATADEVICE  31 /* SATA Device, i.e. Direct Attach SATA */
  80   80  #define HBA_PORTTYPE_SASEXPANDER 32 /* SAS Expander */
  81   81  
  82   82  /* SM-HBA 6.4.1.2 Port State */
  83   83  #define HBA_PORTSTATE_DEGRADED  9 /* Degraded, but Operational mode */
  84   84  
  85   85  /* SM-HBA 6.11.1.3 Port Speed */
  86   86  #define HBA_PORTSPEED_4GBIT     8  /*  4 GBit / sec */
  87   87  
  88   88  /* SM-HBA 6.1   Basic Attributes Types */
  89   89  typedef struct SMHBA_scsilun {HBA_UINT8 lun[8]; }
  90   90      SMHBA_SCSILUN, *PSMHBA_SCSILUN;
  91   91                          /* A byte array representation of a SCSI */
  92   92                          /* LUN (see SAM-4). The first byte of the */
  93   93                          /* LUN shall be in the first byte of the */
  94   94                          /* array, and successive bytes of the SCSI */
  95   95                          /* LUN shall be in successive bytes of the */
  96   96                          /* array. */
  97   97  typedef unsigned long HBA_SCSILUN;
  98   98                          /* A 64 bit unsigned integer representation */
  99   99                          /* of a SCSI LUN (see SAM-4); */
 100  100                          /* may use OS-specific typedef. */
 101  101                          /* Byte zero of a SCSI LUN shall be stored */
 102  102                          /* in the lowest memory address */
 103  103                          /* of the unsigned 64-bit integer value, */
 104  104                          /* and successive bytes of the SCSI LUN */
 105  105                          /* shall be stored in successively higher memory */
 106  106                          /* addresses of the unsigned 64-bit intege value. */
 107  107                          /* Note that computers often do not store */
 108  108                          /* a byte array in memory in the same order */
 109  109                          /* as they store an integer. */
 110  110                          /* This standard requires storage as a byte array */
 111  111  
 112  112  
 113  113  /* SM-HBA 6.3.1 Generic Adapter Attribute */
 114  114  typedef struct SMHBA_AdapterAttributes {
 115  115          char                    Manufacturer[64];
 116  116          char                    SerialNumber[64];
 117  117          char                    Model[256];
 118  118          char                    ModelDescription[256];
 119  119          char                    HardwareVersion[256];
 120  120          char                    DriverVersion[256];
 121  121          char                    OptionROMVersion[256];
 122  122          char                    FirmwareVersion[256];
 123  123          HBA_UINT32              VendorSpecificID;
 124  124          char                    DriverName[256];
 125  125          char                    HBASymbolicName[256];
 126  126          char                    RedundantOptionROMVersion[256];
 127  127          char                    RedundantFirmwareVersion[256];
 128  128  } SMHBA_ADAPTERATTRIBUTES, *PSMHBA_ADAPTERATTRIBUTES;
 129  129  
 130  130  /* SM-HBA 6.4.6 SMHBA FC Port Attributes */
 131  131  typedef struct SMHBA_FC_Port {
 132  132          HBA_WWN                 NodeWWN;
 133  133          HBA_WWN                 PortWWN;
 134  134          HBA_UINT32              FcId;
 135  135          HBA_COS                 PortSupportedClassofService;
 136  136          HBA_FC4TYPES            PortSupportedFc4Types;
 137  137          HBA_FC4TYPES            PortActiveFc4Types;
 138  138          HBA_WWN                 FabricName;
 139  139          char                    PortSymbolicName[256];
 140  140          HBA_UINT32              NumberofDiscoveredPorts;
 141  141          HBA_UINT8               NumberofPhys;
 142  142  }SMHBA_FC_PORT, *PSMHBA_FC_PORT;
 143  143  
 144  144  /* SM-HBA 6.4.7.1 HBA_SASPortProtocol */
 145  145  typedef HBA_UINT32      HBA_SASPORTPROTOCOL;
 146  146  #define HBA_SASPORTPROTOCOL_SSP     1 /* Serial SCSI Protocol Port */
 147  147  #define HBA_SASPORTPROTOCOL_STP     2 /* Serial ATA Tunneling Protocol Port */
 148  148  #define HBA_SASPORTPROTOCOL_SMP     4 /* Serial Management Protocol Port */
 149  149  /* SATA Device, Direct Attached or anywhere in the domain. */
 150  150  #define HBA_SASPORTPROTOCOL_SATA    8
 151  151  
 152  152  /* SM-HBA 6.4.8 SMHBA SAS Port Attributes */
 153  153  typedef struct SMHBA_SAS_Port {
 154  154          HBA_SASPORTPROTOCOL     PortProtocol;
 155  155          HBA_WWN                 LocalSASAddress;
 156  156          HBA_WWN                 AttachedSASAddress;
 157  157          HBA_UINT32              NumberofDiscoveredPorts;
 158  158          HBA_UINT32              NumberofPhys;
 159  159  } SMHBA_SAS_PORT, *PSMHBA_SAS_PORT;
 160  160  
 161  161  /* SM-HBA 6.4.2 Generic Port Attributes */
 162  162  typedef union SMHBA_Port {
 163  163          SMHBA_FC_PORT           *FCPort;
 164  164          SMHBA_SAS_PORT          *SASPort;
 165  165  } SMHBA_PORT, *PSMHBA_PORT;
 166  166  
 167  167  typedef struct SMHBA_PortAttributes {
 168  168          HBA_PORTTYPE            PortType;
 169  169          HBA_PORTSTATE           PortState;
 170  170          char                    OSDeviceName[256];
 171  171          SMHBA_PORT              PortSpecificAttribute;
 172  172  } SMHBA_PORTATTRIBUTES, *PSMHBA_PORTATTRIBUTES;
 173  173  
 174  174  /* SM-HBA 6.5.1.1 FC Phy Speed */
 175  175  typedef HBA_UINT32 HBA_FCPHYSPEED;
 176  176  /* Unknown transceiver incapable of reporting */
 177  177  #define HBA_FCSPEED_UNKNOWN             0
 178  178  /*
 179  179   * The following are redundantly defined in SM-HBA 6.11.1.3 Port Speed.
 180  180   * #define  HBA_PORTSPEED_1GBIT            1       1 GBit/sec
 181  181   * #define  HBA_PORTSPEED_2GBIT            2          2 GBit/sec
 182  182   * #define  HBA_PORTSPEED_10GBIT           4          10 GBit/sec
 183  183   * #define  HBA_PORTSPEED_4GBIT            8          4 GBit/sec
 184  184   */
 185  185  #define HBA_FCPHYSPEED_8GBIT            16  /* 8 GBit/sec */
 186  186  #define HBA_FCPHYSPEED_16GBIT           32  /* 16 GBit/sec */
 187  187  /*
 188  188   * The following conflicts with HBA API
 189  189   * #define  HBA_PORTSPEED_NOT_NEGOTIATED   (1<<15)  Speed not established
 190  190   */
 191  191  
 192  192  /* SM-HBA 6.6.1.2 SM-HBA FC Phy Type */
 193  193  typedef HBA_UINT8 HBA_FCPHYTYPE;
 194  194  #define HBA_FCPHYTYPE_UNKNOWN               1 /* Unknown Phy type */
 195  195  #define HBA_FCPHYTYPE_OPTICAL               2 /* Optical Phy */
 196  196  #define HBA_FCPHYTYPE_COPPER                4 /* Copper Phy */
 197  197  
 198  198  /* SM-HBA 6.5.2 SM-HBA FC Phy Attributes */
 199  199  typedef struct SMHBA_FC_Phy {
 200  200          HBA_FCPHYSPEED      PhySupportedSpeed;  /* PhySupportedSpeed */
 201  201          HBA_FCPHYSPEED      PhySpeed;           /* PhySpeed */
 202  202          HBA_FCPHYTYPE       PhyType;
 203  203          HBA_UINT32          MaxFrameSize;       /* MaxFrameSize */
 204  204  } SMHBA_FC_PHY, *PSMHBA_FC_PHY;
 205  205  
 206  206  /* SM-HBA 6.5.4 SAS PHY Attribute Data Declaration */
 207  207  typedef HBA_UINT32 HBA_SASPHYSPEED;
 208  208  
 209  209  #define HBA_SASSTATE_UNKNOWN    0x00 /* Phy is enabled. Speed is unknown */
 210  210  #define HBA_SASSTATE_DISABLED   0x01 /* Phy is disabled. */
 211  211  /* Phy is enabled. But failed speed negotiation. */
 212  212  #define HBA_SASSTATE_FAILED     0x02
  
    | 
      ↓ open down ↓ | 
    212 lines elided | 
    
      ↑ open up ↑ | 
  
 213  213  /*
 214  214   * Phy is enabled. Detected a SATA device and entered the SATA Spinup hold
 215  215   * state.
 216  216   */
 217  217  #define HBA_SASSTATE_SATASPINUP    0x03
 218  218  /* The phy is attached to a Port Selector (see SATA-2.6). */
 219  219  #define HBA_SASSTATE_SATAPORTSEL    0x04
 220  220  #define HBA_SASSPEED_1_5GBIT        0x08 /*  1.5 GBit/sec */
 221  221  #define HBA_SASSPEED_3GBIT          0x09 /*  3 GBit/sec */
 222  222  #define HBA_SASSPEED_6GBIT          0x0a /*  6 GBit/sec */
      223 +#define HBA_SASSPEED_12GBIT         0x0b /* 12 GBit/sec */
 223  224  
 224  225  /* SM-HBA  6.5.5 SAS Phy Attribute */
 225  226  typedef struct SMHBA_SAS_Phy {
 226  227          HBA_UINT8           PhyIdentifier;
 227  228          HBA_SASPHYSPEED     NegotiatedLinkRate;
 228  229          HBA_SASPHYSPEED     ProgrammedMinLinkRate;
 229  230          HBA_SASPHYSPEED     HardwareMinLinkRate;
 230  231          HBA_SASPHYSPEED     ProgrammedMaxLinkRate;
 231  232          HBA_SASPHYSPEED     HardwareMaxLinkRate;
 232  233          HBA_WWN             domainPortWWN;
 233  234  } SMHBA_SAS_PHY, *PSMHBA_SAS_PHY;
 234  235  
 235  236  /* SM-HBA 6.6.1.1 Protocol Statistics Data Declarations */
 236  237  /* Statistical counters for FC-4, SSP, STP, SMP protocols */
 237  238  typedef struct SMHBA_ProtocolStatistics {
 238  239          HBA_INT64           SecondsSinceLastReset;
 239  240          HBA_INT64           InputRequests;
 240  241          HBA_INT64           OutputRequests;
 241  242          HBA_INT64           ControlRequests;
 242  243          HBA_INT64           InputMegabytes;
 243  244          HBA_INT64           OutputMegabytes;
 244  245  } SMHBA_PROTOCOLSTATISTICS, *PSMHBA_PROTOCOLSTATISTICS;
 245  246  
 246  247  /* SM-HBA 6.6.2.1 Port Statistics Data Declarations */
 247  248  typedef struct SMHBA_PortStatistics {
 248  249          HBA_INT64           SecondsSinceLastReset;
 249  250          HBA_INT64           TxFrames;
 250  251          HBA_INT64           TxWords;
 251  252          HBA_INT64           RxFrames;
 252  253          HBA_INT64           RxWords;
 253  254  }SMHBA_PORTSTATISTICS, *PSMHBA_PORTSTATISTICS;
 254  255  
 255  256  /* SM-HBA 6.6.2.2 SAS Phy Statistics Data Declaration */
 256  257  typedef struct SMHBA_SASPhyStatistics {
 257  258          HBA_INT64           SecondsSinceLastReset;
 258  259          HBA_INT64           TxFrames;
 259  260          HBA_INT64           TxWords;
 260  261          HBA_INT64           RxFrames;
 261  262          HBA_INT64           RxWords;
 262  263          HBA_INT64           InvalidDwordCount;
 263  264          HBA_INT64           RunningDisparityErrorCount;
 264  265          HBA_INT64           LossofDwordSyncCount;
 265  266          HBA_INT64           PhyResetProblemCount;
 266  267  } SMHBA_SASPHYSTATISTICS, *PSMHBA_SASPHYSTATISTICS;
 267  268  
 268  269  /* SM-HBA 6.6.2.4 FC Phy Statistics Data Declaration */
 269  270  /* Statistical counters for FC-0, FC-1, and FC-2 */
 270  271  typedef struct SMHBA_FCPhyStatistics {
 271  272          HBA_INT64           SecondsSinceLastReset;
 272  273          HBA_INT64           TxFrames;
 273  274          HBA_INT64           TxWords;
 274  275          HBA_INT64           RxFrames;
 275  276          HBA_INT64           RxWords;
 276  277          HBA_INT64           LIPCount;
 277  278          HBA_INT64           NOSCount;
 278  279          HBA_INT64           ErrorFrames;
 279  280          HBA_INT64           DumpedFrames;
 280  281          HBA_INT64           LinkFailureCount;
 281  282          HBA_INT64           LossOfSyncCount;
 282  283          HBA_INT64           LossOfSignalCount;
 283  284          HBA_INT64           PrimitiveSeqProtocolErrCount;
 284  285          HBA_INT64           InvalidTxWordCount;
 285  286          HBA_INT64           InvalidCRCCount;
 286  287  }SMHBA_FCPHYSTATISTICS, *PSMHBA_FCPHYSTATISTICS;
 287  288  
 288  289  /* SM-HBA 6.6.2.1 Phy Statistics Data Declaration */
 289  290  typedef union SMHBA_PhyStatistics {
 290  291          SMHBA_SASPHYSTATISTICS  *SASPhyStatistics;
 291  292          SMHBA_FCPHYSTATISTICS   *FCPhyStatistics;
 292  293  } SMHBA_PHYSTATISTICS, *PSMHBA_PHYSTATISTICS;
 293  294  
 294  295  /* SM-HBA 6.7.1.1 SMHBA_BIND_CAPABILITY */
 295  296  typedef HBA_UINT32 SMHBA_BIND_CAPABILITY;
 296  297  #define SMHBA_CAN_BIND_TO_WWPN 0x0001
 297  298  #define SMHBA_CAN_BIND_TO_LUID 0x0002
 298  299  #define SMHBA_CAN_BIND_ANY_LUNS 0x0400
 299  300  #define SMHBA_CAN_BIND_AUTOMAP 0x0800
 300  301  
 301  302  /* SM-HBA 6.7.1.2 SMHBA_BIND_TYPE */
 302  303  typedef HBA_UINT32 SMHBA_BIND_TYPE;
 303  304  #define SMHBA_BIND_TO_WWPN 0x0001
 304  305  #define SMHBA_BIND_TO_LUID 0x0002
 305  306  
 306  307  /* SM-HBA 6.7.1.3 SMHBA_ScsiId */
 307  308  typedef struct SMHBA_ScsiId {
 308  309          char        OSDeviceName[256];
 309  310          HBA_UINT32  ScsiBusNumber;
 310  311          HBA_UINT32  ScsiTargetNumber;
 311  312          HBA_UINT32  ScsiOSLun;
 312  313  } SMHBA_SCSIID, *PSMHBA_SCSIID;
 313  314  
 314  315  /* SM-HBA 6.7.1.4 SMHBA_LUID */
 315  316  typedef struct SMHBA_LUID {
 316  317          char        buffer[256];
 317  318  } SMHBA_LUID, *PSMHBA_LUID;
 318  319  
 319  320  /* SM-HBA 6.7.1.5 SMHBA_PORTLUN */
 320  321  typedef struct SMHBA_PORTLUN {
 321  322          HBA_WWN             PortWWN;
 322  323          HBA_WWN             domainPortWWN;
 323  324          SMHBA_SCSILUN       TargetLun;
 324  325  } SMHBA_PORTLUN, *PSMHBA_PORTLUN;
 325  326  
 326  327  /* SM-HBA 6.7.1.6 Composite types */
 327  328  typedef struct SMHBA_ScsiEntry {
 328  329          SMHBA_SCSIID ScsiId;
 329  330          SMHBA_PORTLUN PortLun;
 330  331          SMHBA_LUID LUID;
 331  332  } SMHBA_SCSIENTRY, *PSMHBA_SCSIENTRY;
 332  333  
 333  334  typedef struct SMHBA_TargetMapping {
 334  335          HBA_UINT32 NumberOfEntries;
 335  336          SMHBA_SCSIENTRY entry[1]; /* Variable length array */
 336  337  } SMHBA_TARGETMAPPING, *PSMHBA_TARGETMAPPING;
 337  338  
 338  339  typedef struct SMHBA_BindingEntry {
 339  340          SMHBA_BIND_TYPE type;
 340  341          SMHBA_SCSIID    ScsiId;
 341  342          SMHBA_PORTLUN   PortLun;
 342  343          SMHBA_LUID      LUID;
 343  344          HBA_STATUS      Status;
 344  345  } SMHBA_BINDINGENTRY, *PSMHBA_BINDINGENTRY;
 345  346  
 346  347  typedef struct SMHBA_Binding {
 347  348          HBA_UINT32          NumberOfEntries;
 348  349          SMHBA_BINDINGENTRY  entry[1]; /* Variable length array */
 349  350  } SMHBA_BINDING, *PSMHBA_BINDING;
 350  351  
 351  352  /* SM-HBA 6.9.5 Library Attribute Data Declarations */
 352  353  typedef struct SMHBA_LibraryAttributes {
 353  354          char        LibPath[256];
 354  355          char        VName[256];
 355  356          char        VVersion[256];
 356  357          struct {
 357  358                  int     tm_mday;    /* day of the month - [1 - 31] */
 358  359                  int     tm_mon;     /* months since January - [0 - 11] */
 359  360                  int     tm_year;    /* years since 1900 */
 360  361          } build_date;
 361  362  } SMHBA_LIBRARYATTRIBUTES, *PSMHBA_LIBRARYATTRIBUTES;
 362  363  
 363  364  /* SM-HBA 6.8.1 Asynchronous Event Data Declarations */
 364  365  #define HBA_EVENT_PORT_BROADCAST_CHANGE 0x205
 365  366  #define HBA_EVENT_PORT_BROADCAST_SES    0x208
 366  367  #define HBA_EVENT_PORT_BROADCAST_D24_0  0x206
 367  368  #define HBA_EVENT_PORT_BROADCAST_D27_4  0x207
 368  369  #define HBA_EVENT_PORT_BROADCAST_D01_4  0x209
 369  370  #define HBA_EVENT_PORT_BROADCAST_D04_7  0x20A
 370  371  #define HBA_EVENT_PORT_BROADCAST_D16_7  0x20B
 371  372  #define HBA_EVENT_PORT_BROADCAST_D29_7  0x20C
 372  373  #define HBA_EVENT_PORT_ALL              0x2FF
 373  374  
 374  375  /* SM-HBA specific entry points. */
 375  376  
 376  377  HBA_UINT32 SMHBA_GetVersion();
 377  378  
 378  379  HBA_UINT32 SMHBA_GetWrapperLibraryAttributes(
 379  380          SMHBA_LIBRARYATTRIBUTES *attributes
 380  381  );
 381  382  
 382  383  HBA_UINT32 SMHBA_GetVendorLibraryAttributes(
 383  384          HBA_UINT32              adapter_index,
 384  385          SMHBA_LIBRARYATTRIBUTES *attributes
 385  386  );
 386  387  
 387  388  HBA_STATUS SMHBA_GetAdapterAttributes(
 388  389          HBA_HANDLE handle,
 389  390          SMHBA_ADAPTERATTRIBUTES *pAdapterAttributes
 390  391  );
 391  392  
 392  393  HBA_STATUS SMHBA_GetNumberOfPorts(
 393  394          HBA_HANDLE handle,
 394  395          HBA_UINT32 *numberofports
 395  396  );
 396  397  
 397  398  HBA_STATUS SMHBA_GetPortType(
 398  399          HBA_HANDLE handle,
 399  400          HBA_UINT32 portindex,
 400  401          HBA_PORTTYPE *porttype
 401  402  );
 402  403  
 403  404  HBA_STATUS SMHBA_GetAdapterPortAttributes(
 404  405          HBA_HANDLE handle,
 405  406          HBA_UINT32 portindex,
 406  407          SMHBA_PORTATTRIBUTES *portattributes
 407  408  );
 408  409  
 409  410  HBA_STATUS SMHBA_GetDiscoveredPortAttributes(
 410  411          HBA_HANDLE handle,
 411  412          HBA_UINT32 portindex,
 412  413          HBA_UINT32 discoveredportindex,
 413  414          SMHBA_PORTATTRIBUTES *porattributes
 414  415  );
 415  416  
 416  417  HBA_STATUS SMHBA_GetPortAttributesByWWN(
 417  418          HBA_HANDLE handle,
 418  419          HBA_WWN portWWN,
 419  420          HBA_WWN domainPortWWN,
 420  421          SMHBA_PORTATTRIBUTES *portattributes
 421  422  );
 422  423  
 423  424  HBA_STATUS SMHBA_GetPortAttributesByWWN(
 424  425          HBA_HANDLE handle,
 425  426          HBA_WWN portWWN,
 426  427          HBA_WWN domainPortWWN,
 427  428          SMHBA_PORTATTRIBUTES *portattributes
 428  429  );
 429  430  
 430  431  HBA_STATUS SMHBA_GetFCPhyAttributes(
 431  432          HBA_HANDLE handle,
 432  433          HBA_UINT32 portindex,
 433  434          HBA_UINT32 phyindex,
 434  435          SMHBA_FC_PHY *phytype
 435  436  );
 436  437  
 437  438  HBA_STATUS SMHBA_GetSASPhyAttributes(
 438  439          HBA_HANDLE handle,
 439  440          HBA_UINT32 portindex,
 440  441          HBA_UINT32 phyindex,
 441  442          SMHBA_SAS_PHY *phytype
 442  443  );
 443  444  
 444  445  HBA_STATUS SMHBA_GetProtocolStatistics(
 445  446          HBA_HANDLE handle,
 446  447          HBA_UINT32 portindex,
 447  448          HBA_UINT32 protocoltype,
 448  449          SMHBA_PROTOCOLSTATISTICS *pProtocolStatistics
 449  450  );
 450  451  
 451  452  HBA_STATUS SMHBA_GetPhyStatistics(
 452  453          HBA_HANDLE handle,
 453  454          HBA_UINT32 portindex,
 454  455          HBA_UINT32 phyindex,
 455  456          SMHBA_PHYSTATISTICS *pPhyStatistics
 456  457  );
 457  458  
 458  459  HBA_STATUS SMHBA_SendTEST(
 459  460          HBA_HANDLE handle,
 460  461          HBA_WWN hbaPortWWN,
 461  462          HBA_WWN destWWN,
 462  463          HBA_UINT32 destFCID,
 463  464          void *pReqBuffer,
 464  465          HBA_UINT32 ReqBufferSize
 465  466  );
 466  467  
 467  468  HBA_STATUS SMHBA_SendECHO(
 468  469          HBA_HANDLE handle,
 469  470          HBA_WWN hbaPortWWN,
 470  471          HBA_WWN destWWN,
 471  472          HBA_UINT32 destFCID,
 472  473          void *pReqBuffer,
 473  474          HBA_UINT32 ReqBufferSize,
 474  475          void *pRspBuffer,
 475  476          HBA_UINT32 *pRspBufferSize
 476  477  );
 477  478  
 478  479  HBA_UINT32 SMHBA_SendSMPPassThru(
 479  480          HBA_HANDLE handle,
 480  481          HBA_WWN hbaportWWN,
 481  482          HBA_WWN destportWWN,
 482  483          HBA_WWN domainPortWWN,
 483  484          void *pReqBuffer,
 484  485          HBA_UINT32 ReqBufferSize,
 485  486          void *pRspBuffer,
 486  487          HBA_UINT32 *pRspBufferSize
 487  488  );
 488  489  
 489  490  HBA_STATUS SMHBA_GetBindingCapability(
 490  491          HBA_HANDLE handle,
 491  492          HBA_WWN hbaPortWWN,
 492  493          HBA_WWN domainPortWWN,
 493  494          SMHBA_BIND_CAPABILITY *pFlags
 494  495  );
 495  496  
 496  497  HBA_STATUS SMHBA_GetBindingSupport(
 497  498          HBA_HANDLE handle,
 498  499          HBA_WWN hbaPortWWN,
 499  500          HBA_WWN domainPortWWN,
 500  501          SMHBA_BIND_CAPABILITY *pFlags
 501  502  );
 502  503  
 503  504  HBA_STATUS SMHBA_SetBindingSupport(
 504  505          HBA_HANDLE handle,
 505  506          HBA_WWN hbaPortWWN,
 506  507          HBA_WWN domainPortWWN,
 507  508          SMHBA_BIND_CAPABILITY flags
 508  509  );
 509  510  
 510  511  HBA_STATUS SMHBA_GetTargetMapping(
 511  512          HBA_HANDLE handle,
 512  513          HBA_WWN hbaPortWWN,
 513  514          HBA_WWN domainPortWWN,
 514  515          SMHBA_TARGETMAPPING *pMapping
 515  516  );
 516  517  
 517  518  HBA_STATUS SMHBA_GetPersistentBinding(
 518  519          HBA_HANDLE handle,
 519  520          HBA_WWN hbaPortWWN,
 520  521          HBA_WWN domainPortWWN,
 521  522          SMHBA_BINDING *binding
 522  523  );
 523  524  
 524  525  HBA_STATUS SMHBA_SetPersistentBinding(
 525  526          HBA_HANDLE handle,
 526  527          HBA_WWN hbaPortWWN,
 527  528          HBA_WWN domainPortWWN,
 528  529          const SMHBA_BINDING *binding
 529  530  );
 530  531  
 531  532  HBA_STATUS SMHBA_RemovePersistentBinding(
 532  533          HBA_HANDLE handle,
 533  534          HBA_WWN hbaPortWWN,
 534  535          HBA_WWN domainPortWWN,
 535  536          const SMHBA_BINDING *binding
 536  537  );
 537  538  
 538  539  HBA_STATUS SMHBA_RemoveAllPersistentBindings(
 539  540          HBA_HANDLE handle,
 540  541          HBA_WWN hbaPortWWN,
 541  542          HBA_WWN domainPortWWN
 542  543  );
 543  544  
 544  545  HBA_STATUS SMHBA_GetLUNStatistics(
 545  546          HBA_HANDLE handle,
 546  547          const HBA_SCSIID *lunit,
 547  548          SMHBA_PROTOCOLSTATISTICS *statistics
 548  549  );
 549  550  
 550  551  HBA_STATUS SMHBA_ScsiInquiry(
 551  552          HBA_HANDLE handle,
 552  553          HBA_WWN hbaPortWWN,
 553  554          HBA_WWN discoveredPortWWN,
 554  555          HBA_WWN domainPortWWN,
 555  556          SMHBA_SCSILUN smhbaLUN,
 556  557          HBA_UINT8 CDB_Byte1,
 557  558          HBA_UINT8 CDB_Byte2,
 558  559          void *pRspBuffer,
 559  560          HBA_UINT32 *pRspBufferSize,
 560  561          HBA_UINT8 *pScsiStatus,
 561  562          void *pSenseBuffer,
 562  563          HBA_UINT32 *pSenseBufferSize
 563  564  );
 564  565  
 565  566  HBA_STATUS SMHBA_ScsiReportLUNs(
 566  567          HBA_HANDLE handle,
 567  568          HBA_WWN hbaPortWWN,
 568  569          HBA_WWN discoveredPortWWN,
 569  570          HBA_WWN domainPortWWN,
 570  571          void *pRspBuffer,
 571  572          HBA_UINT32 *pRspBufferSize,
 572  573          HBA_UINT8 *pScsiStatus,
 573  574          void *pSenseBuffer,
 574  575          HBA_UINT32 *pSenseBufferSize
 575  576  );
 576  577  
 577  578  HBA_STATUS SMHBA_ScsiReadCapacity(
 578  579          HBA_HANDLE handle,
 579  580          HBA_WWN hbaPortWWN,
 580  581          HBA_WWN discoveredPortWWN,
 581  582          HBA_WWN domainPortWWN,
 582  583          SMHBA_SCSILUN smhbaLUN,
 583  584          void *pRspBuffer,
 584  585          HBA_UINT32 *pRspBufferSize,
 585  586          HBA_UINT8 *pScsiStatus,
 586  587          void *pSenseBuffer,
 587  588          HBA_UINT32 *pSenseBufferSize
 588  589  );
 589  590  
 590  591  HBA_STATUS SMHBA_RegisterForAdapterAddEvents(
 591  592          void (*pCallback) (
 592  593                  void *pData,
 593  594                  HBA_WWN portWWN,
 594  595                  HBA_UINT32 eventType),
 595  596          void *pUserData,
 596  597          HBA_CALLBACKHANDLE *pCallbackHandle
 597  598  );
 598  599  
 599  600  HBA_STATUS SMHBA_RegisterForAdapterEvents(
 600  601          void (*pCallback) (
 601  602                  void *pData,
 602  603                  HBA_WWN portWWN,
 603  604                  HBA_UINT32 eventType),
 604  605          void *pUserData,
 605  606          HBA_HANDLE handle,
 606  607          HBA_CALLBACKHANDLE *pCallbackHandle
 607  608  );
 608  609  
 609  610  HBA_STATUS SMHBA_RegisterForAdapterPortEvents(
 610  611          void (*pCallback) (
 611  612                  void *pData,
 612  613                  HBA_WWN portWWN,
 613  614                  HBA_UINT32 eventType,
 614  615                  HBA_UINT32 fabricPortID),
 615  616          void *pUserData,
 616  617          HBA_HANDLE handle,
 617  618          HBA_WWN portWWN,
 618  619          HBA_UINT32 specificEventType,
 619  620          HBA_CALLBACKHANDLE *pCallbackHandle
 620  621  );
 621  622  
 622  623  HBA_STATUS SMHBA_RegisterForAdapterPortStatEvents(
 623  624          void (*pCallback) (
 624  625                  void *pData,
 625  626                  HBA_WWN portWWN,
 626  627                  HBA_UINT32 protocolType,
 627  628                  HBA_UINT32 eventType),
 628  629          void *pUserData,
 629  630          HBA_HANDLE handle,
 630  631          HBA_WWN portWWN,
 631  632          HBA_UINT32 protocolType,
 632  633          SMHBA_PROTOCOLSTATISTICS stats,
 633  634          HBA_UINT32 statType,
 634  635          HBA_CALLBACKHANDLE *pCallbackHandle
 635  636  );
 636  637  
 637  638  HBA_STATUS SMHBA_RegisterForAdapterPhyStatEvents(
 638  639          void (*pCallback) (
 639  640                  void *pData,
 640  641                  HBA_WWN portWWN,
 641  642                  HBA_UINT32 phyIndex,
 642  643                  HBA_UINT32 eventType),
 643  644          void *pUserData,
 644  645          HBA_HANDLE handle,
 645  646          HBA_WWN portWWN,
 646  647          HBA_UINT32 phyIndex,
 647  648          SMHBA_PHYSTATISTICS stats,
 648  649          HBA_UINT32 statType,
 649  650          HBA_CALLBACKHANDLE *pCallbackHandle
 650  651  );
 651  652  
 652  653  HBA_STATUS SMHBA_RegisterForTargetEvents(
 653  654          void (*pCallback) (
 654  655                  void *pData,
 655  656                  HBA_WWN hbaPortWWN,
 656  657                  HBA_WWN discoveredPortWWN,
 657  658                  HBA_WWN domainPortWWN,
 658  659                  HBA_UINT32 eventType),
 659  660          void *pUserData,
 660  661          HBA_HANDLE handle,
 661  662          HBA_WWN hbaPortWWN,
 662  663          HBA_WWN discoveredPortWWN,
 663  664          HBA_WWN domainPortWWN,
 664  665          HBA_CALLBACKHANDLE *pCallbackHandle,
 665  666          HBA_UINT32 allTargets
 666  667  );
 667  668  
 668  669  #ifdef __cplusplus
 669  670  }
 670  671  #endif
 671  672  
 672  673  #endif /* _SMHBAAPI_H_ */
  
    | 
      ↓ open down ↓ | 
    440 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX