58 #define _MPTSAS_IOCTL_H
59
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63
64 #include <sys/types.h>
65
66 #define MPTIOCTL ('I' << 8)
67 #define MPTIOCTL_GET_ADAPTER_DATA (MPTIOCTL | 1)
68 #define MPTIOCTL_UPDATE_FLASH (MPTIOCTL | 2)
69 #define MPTIOCTL_RESET_ADAPTER (MPTIOCTL | 3)
70 #define MPTIOCTL_PASS_THRU (MPTIOCTL | 4)
71 #define MPTIOCTL_EVENT_QUERY (MPTIOCTL | 5)
72 #define MPTIOCTL_EVENT_ENABLE (MPTIOCTL | 6)
73 #define MPTIOCTL_EVENT_REPORT (MPTIOCTL | 7)
74 #define MPTIOCTL_GET_PCI_INFO (MPTIOCTL | 8)
75 #define MPTIOCTL_DIAG_ACTION (MPTIOCTL | 9)
76 #define MPTIOCTL_REG_ACCESS (MPTIOCTL | 10)
77 #define MPTIOCTL_GET_DISK_INFO (MPTIOCTL | 11)
78
79 /*
80 * The following are our ioctl() return status values. If everything went
81 * well, we return good status. If the buffer length sent to us is too short
82 * we return a status to tell the user.
83 */
84 #define MPTIOCTL_STATUS_GOOD 0
85 #define MPTIOCTL_STATUS_LEN_TOO_SHORT 1
86
87 typedef struct mptsas_pci_bits
88 {
89 union {
90 struct {
91 uint32_t DeviceNumber :5;
92 uint32_t FunctionNumber :3;
93 uint32_t BusNumber :24;
94 } bits;
95 uint32_t AsDWORD;
96 } u;
97 uint32_t PciSegmentId;
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
332 #ifdef __cplusplus
333 }
334 #endif
335
336 #endif /* _MPTSAS_IOCTL_H */
|
58 #define _MPTSAS_IOCTL_H
59
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63
64 #include <sys/types.h>
65
66 #define MPTIOCTL ('I' << 8)
67 #define MPTIOCTL_GET_ADAPTER_DATA (MPTIOCTL | 1)
68 #define MPTIOCTL_UPDATE_FLASH (MPTIOCTL | 2)
69 #define MPTIOCTL_RESET_ADAPTER (MPTIOCTL | 3)
70 #define MPTIOCTL_PASS_THRU (MPTIOCTL | 4)
71 #define MPTIOCTL_EVENT_QUERY (MPTIOCTL | 5)
72 #define MPTIOCTL_EVENT_ENABLE (MPTIOCTL | 6)
73 #define MPTIOCTL_EVENT_REPORT (MPTIOCTL | 7)
74 #define MPTIOCTL_GET_PCI_INFO (MPTIOCTL | 8)
75 #define MPTIOCTL_DIAG_ACTION (MPTIOCTL | 9)
76 #define MPTIOCTL_REG_ACCESS (MPTIOCTL | 10)
77 #define MPTIOCTL_GET_DISK_INFO (MPTIOCTL | 11)
78 #define MPTIOCTL_LED_CONTROL (MPTIOCTL | 12)
79
80 /*
81 * The following are our ioctl() return status values. If everything went
82 * well, we return good status. If the buffer length sent to us is too short
83 * we return a status to tell the user.
84 */
85 #define MPTIOCTL_STATUS_GOOD 0
86 #define MPTIOCTL_STATUS_LEN_TOO_SHORT 1
87
88 typedef struct mptsas_pci_bits
89 {
90 union {
91 struct {
92 uint32_t DeviceNumber :5;
93 uint32_t FunctionNumber :3;
94 uint32_t BusNumber :24;
95 } bits;
96 uint32_t AsDWORD;
97 } u;
98 uint32_t PciSegmentId;
313 } mptsas_disk_info_t;
314
315 typedef struct mptsas_get_disk_info
316 {
317 uint16_t DiskCount;
318 mptsas_disk_info_t *PtrDiskInfoArray;
319 uint64_t DiskInfoArraySize;
320 } mptsas_get_disk_info_t;
321
322 #ifdef _KERNEL
323
324 typedef struct mptsas_get_disk_info32
325 {
326 uint16_t DiskCount;
327 caddr32_t PtrDiskInfoArray;
328 uint64_t DiskInfoArraySize;
329 } mptsas_get_disk_info32_t;
330
331 #endif /* _KERNEL */
332
333 /*
334 * LED Control
335 */
336
337 typedef struct mptsas_led_control
338 {
339 uint8_t Command;
340 uint16_t Enclosure;
341 uint16_t Slot;
342 uint8_t Led;
343 uint8_t LedStatus;
344 } mptsas_led_control_t;
345
346 #define MPTSAS_LEDCTL_FLAG_SET 1
347 #define MPTSAS_LEDCTL_FLAG_GET 2
348
349 #define MPTSAS_LEDCTL_LED_IDENT 1
350 #define MPTSAS_LEDCTL_LED_FAIL 2
351 #define MPTSAS_LEDCTL_LED_OK2RM 3
352
353 #ifdef __cplusplus
354 }
355 #endif
356
357 #endif /* _MPTSAS_IOCTL_H */
|