2 * Copyright (c) 1999 Michael Smith
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 #include <sys/ioccom.h>
40 struct mlxd_rebuild_status
47 #define MLXD_STATUS _IOR ('M', 100, int)
48 #define MLXD_REBUILDASYNC _IOW ('M', 101, struct mlxd_rebuild)
49 #define MLXD_CHECKASYNC _IOW ('M', 102, int)
50 #define MLXD_REBUILDSTAT _IOR ('M', 103, struct mlxd_rebuild_status)
53 * System Disk status values
55 #define MLX_SYSD_ONLINE 0x03
56 #define MLX_SYSD_CRITICAL 0x04
57 #define MLX_SYSD_REBUILD 0xfe
58 #define MLX_SYSD_OFFLINE 0xff
66 #define MLX_PAUSE_ALL 0xff
67 #define MLX_PAUSE_CANCEL 0x00
72 struct mlx_usercommand
75 size_t mu_datasize; /* size of databuffer */
76 void *mu_buf; /* address in userspace of databuffer */
77 int mu_bufptr; /* offset into command mailbox to place databuffer address */
80 u_int16_t mu_status; /* command status returned */
81 u_int8_t mu_command[16]; /* command mailbox contents */
84 #define MLX_NEXT_CHILD _IOWR('M', 0, int)
85 #define MLX_RESCAN_DRIVES _IO ('M', 1)
86 #define MLX_DETACH_DRIVE _IOW ('M', 2, int)
87 #define MLX_PAUSE_CHANNEL _IOW ('M', 3, struct mlx_pause)
88 #define MLX_COMMAND _IOWR('M', 4, struct mlx_usercommand)