Print this page
LOCAL: mpt_sas: expose drive ID via ioctl

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