Print this page
OS-1996 mpt_sas: allow physical topology enumeration in libtopo
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_ioctl.h
          +++ new/usr/src/uts/common/sys/scsi/adapters/mpt_sas/mptsas_ioctl.h
↓ open down ↓ 15 lines elided ↑ open up ↑
  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 2010 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
       26 +/*
       27 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
       28 + */
  26   29  
  27   30  /*
  28   31   * Copyright (c) 2000 to 2010, LSI Corporation.
  29   32   * All rights reserved.
  30   33   *
  31   34   * Redistribution and use in source and binary forms of all code within
  32   35   * this file that is exclusively owned by LSI, with or without
  33   36   * modification, is permitted provided that, in addition to the CDDL 1.0
  34   37   * License requirements, the following conditions are met:
  35   38   *
↓ open down ↓ 28 lines elided ↑ open up ↑
  64   67  #define MPTIOCTL_GET_ADAPTER_DATA       (MPTIOCTL | 1)
  65   68  #define MPTIOCTL_UPDATE_FLASH           (MPTIOCTL | 2)
  66   69  #define MPTIOCTL_RESET_ADAPTER          (MPTIOCTL | 3)
  67   70  #define MPTIOCTL_PASS_THRU              (MPTIOCTL | 4)
  68   71  #define MPTIOCTL_EVENT_QUERY            (MPTIOCTL | 5)
  69   72  #define MPTIOCTL_EVENT_ENABLE           (MPTIOCTL | 6)
  70   73  #define MPTIOCTL_EVENT_REPORT           (MPTIOCTL | 7)
  71   74  #define MPTIOCTL_GET_PCI_INFO           (MPTIOCTL | 8)
  72   75  #define MPTIOCTL_DIAG_ACTION            (MPTIOCTL | 9)
  73   76  #define MPTIOCTL_REG_ACCESS             (MPTIOCTL | 10)
       77 +#define MPTIOCTL_GET_DISK_INFO          (MPTIOCTL | 11)
  74   78  
  75   79  /*
  76   80   *  The following are our ioctl() return status values.  If everything went
  77   81   *  well, we return good status.  If the buffer length sent to us is too short
  78   82   *  we return a status to tell the user.
  79   83   */
  80   84  #define MPTIOCTL_STATUS_GOOD            0
  81   85  #define MPTIOCTL_STATUS_LEN_TOO_SHORT   1
  82   86  
  83   87  typedef struct mptsas_pci_bits
↓ open down ↓ 205 lines elided ↑ open up ↑
 289  293  #define REG_MEM_READ    3
 290  294  #define REG_MEM_WRITE   4
 291  295  
 292  296  typedef struct mptsas_reg_access
 293  297  {
 294  298          uint32_t        Command;
 295  299          uint32_t        RegOffset;
 296  300          uint32_t        RegData;
 297  301  } mptsas_reg_access_t;
 298  302  
      303 +/*
      304 + * Disk Toplogy Information
      305 + */
      306 +typedef struct mptsas_disk_info
      307 +{
      308 +        uint64_t        SasAddress;
      309 +        uint16_t        Instance;
      310 +        uint16_t        Enclosure;
      311 +        uint16_t        Slot;
      312 +} mptsas_disk_info_t;
      313 +
      314 +typedef struct mptsas_get_disk_info
      315 +{
      316 +        uint16_t                DiskCount;
      317 +        mptsas_disk_info_t      *PtrDiskInfoArray;
      318 +        uint64_t                DiskInfoArraySize;
      319 +} mptsas_get_disk_info_t;
      320 +
      321 +#ifdef _KERNEL
      322 +
      323 +typedef struct mptsas_get_disk_info32
      324 +{
      325 +        uint16_t                DiskCount;
      326 +        caddr32_t               PtrDiskInfoArray;
      327 +        uint64_t                DiskInfoArraySize;
      328 +} mptsas_get_disk_info32_t;
      329 +
      330 +#endif /* _KERNEL */
      331 +
 299  332  #ifdef  __cplusplus
 300  333  }
 301  334  #endif
 302  335  
 303  336  #endif  /* _MPTSAS_IOCTL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX