Print this page
OS-1997 mpt_sas: expose LED controls to libtopo
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>

@@ -73,10 +73,11 @@
 #define MPTIOCTL_EVENT_REPORT           (MPTIOCTL | 7)
 #define MPTIOCTL_GET_PCI_INFO           (MPTIOCTL | 8)
 #define MPTIOCTL_DIAG_ACTION            (MPTIOCTL | 9)
 #define MPTIOCTL_REG_ACCESS             (MPTIOCTL | 10)
 #define MPTIOCTL_GET_DISK_INFO          (MPTIOCTL | 11)
+#define MPTIOCTL_LED_CONTROL            (MPTIOCTL | 12)
 
 /*
  *  The following are our ioctl() return status values.  If everything went
  *  well, we return good status.  If the buffer length sent to us is too short
  *  we return a status to tell the user.

@@ -327,10 +328,30 @@
         uint64_t                DiskInfoArraySize;
 } mptsas_get_disk_info32_t;
 
 #endif /* _KERNEL */
 
+/*
+ * LED Control
+ */
+
+typedef struct mptsas_led_control
+{
+        uint8_t         Command;
+        uint16_t        Enclosure;
+        uint16_t        Slot;
+        uint8_t         Led;
+        uint8_t         LedStatus;
+} mptsas_led_control_t;
+
+#define MPTSAS_LEDCTL_FLAG_SET          1
+#define MPTSAS_LEDCTL_FLAG_GET          2
+
+#define MPTSAS_LEDCTL_LED_IDENT         1
+#define MPTSAS_LEDCTL_LED_FAIL          2
+#define MPTSAS_LEDCTL_LED_OK2RM         3
+
 #ifdef  __cplusplus
 }
 #endif
 
 #endif  /* _MPTSAS_IOCTL_H */