mlxio.h (58188) | mlxio.h (59136) |
---|---|
1/*- 2 * Copyright (c) 1999 Michael Smith 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 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 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1999 Michael Smith 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 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 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/mlx/mlxio.h 58188 2000-03-18 02:01:37Z msmith $ | 26 * $FreeBSD: head/sys/dev/mlx/mlxio.h 59136 2000-04-11 02:52:46Z msmith $ |
27 */ 28 29#include <sys/ioccom.h> 30 31/* 32 * System Disk ioctls 33 */ | 27 */ 28 29#include <sys/ioccom.h> 30 31/* 32 * System Disk ioctls 33 */ |
34struct mlxd_rebuild 35{ 36 int rb_channel; 37 int rb_target; 38}; | |
39 | 34 |
40struct mlxd_rebuild_status 41{ 42 int rs_drive; 43 int rs_size; 44 int rs_remaining; 45}; 46 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) 51 52/* 53 * System Disk status values 54 */ | 35/* system disk status values */ |
55#define MLX_SYSD_ONLINE 0x03 56#define MLX_SYSD_CRITICAL 0x04 | 36#define MLX_SYSD_ONLINE 0x03 37#define MLX_SYSD_CRITICAL 0x04 |
57#define MLX_SYSD_REBUILD 0xfe | |
58#define MLX_SYSD_OFFLINE 0xff 59 | 38#define MLX_SYSD_OFFLINE 0xff 39 |
40#define MLXD_STATUS _IOR ('M', 100, int) 41#define MLXD_CHECKASYNC _IOR ('M', 101, int) /* command result returned in argument */ 42 |
|
60/* 61 * Controller ioctls 62 */ 63struct mlx_pause 64{ 65 int mp_which; 66#define MLX_PAUSE_ALL 0xff 67#define MLX_PAUSE_CANCEL 0x00 --- 12 unchanged lines hidden (view full) --- 80 u_int16_t mu_status; /* command status returned */ 81 u_int8_t mu_command[16]; /* command mailbox contents */ 82 83 /* wrapper */ 84 int mu_error; /* result of submission to driver */ 85 86}; 87 | 43/* 44 * Controller ioctls 45 */ 46struct mlx_pause 47{ 48 int mp_which; 49#define MLX_PAUSE_ALL 0xff 50#define MLX_PAUSE_CANCEL 0x00 --- 12 unchanged lines hidden (view full) --- 63 u_int16_t mu_status; /* command status returned */ 64 u_int8_t mu_command[16]; /* command mailbox contents */ 65 66 /* wrapper */ 67 int mu_error; /* result of submission to driver */ 68 69}; 70 |
71struct mlx_rebuild_request 72{ 73 int rr_channel; 74 int rr_target; 75 int rr_status; 76}; 77 78struct mlx_rebuild_status 79{ 80 u_int16_t rs_code; 81#define MLX_REBUILDSTAT_REBUILDCHECK 0x0000 82#define MLX_REBUILDSTAT_ADDCAPACITY 0x0400 83#define MLX_REBUILDSTAT_ADDCAPACITYINIT 0x0500 84#define MLX_REBUILDSTAT_IDLE 0xffff 85 u_int16_t rs_drive; 86 int rs_size; 87 int rs_remaining; 88}; 89 |
|
88#define MLX_NEXT_CHILD _IOWR('M', 0, int) 89#define MLX_RESCAN_DRIVES _IO ('M', 1) 90#define MLX_DETACH_DRIVE _IOW ('M', 2, int) 91#define MLX_PAUSE_CHANNEL _IOW ('M', 3, struct mlx_pause) 92#define MLX_COMMAND _IOWR('M', 4, struct mlx_usercommand) | 90#define MLX_NEXT_CHILD _IOWR('M', 0, int) 91#define MLX_RESCAN_DRIVES _IO ('M', 1) 92#define MLX_DETACH_DRIVE _IOW ('M', 2, int) 93#define MLX_PAUSE_CHANNEL _IOW ('M', 3, struct mlx_pause) 94#define MLX_COMMAND _IOWR('M', 4, struct mlx_usercommand) |
93 | 95#define MLX_REBUILDASYNC _IOWR('M', 5, struct mlx_rebuild_request) 96#define MLX_REBUILDSTAT _IOR ('M', 6, struct mlx_rebuild_status) 97#define MLX_GET_SYSDRIVE _IOWR('M', 7, int) |