summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx/mlxio.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-04-11 02:52:46 +0000
committermsmith <msmith@FreeBSD.org>2000-04-11 02:52:46 +0000
commit612fc8c5158ae5c2f3017445553eefe095fbbfc1 (patch)
treef329a647fd19231f32b45be5d1325231c626e853 /sys/dev/mlx/mlxio.h
parent1f9a3b6ffeeb06ce3881cbb6016adb4f15ef9d81 (diff)
downloadFreeBSD-src-612fc8c5158ae5c2f3017445553eefe095fbbfc1.zip
FreeBSD-src-612fc8c5158ae5c2f3017445553eefe095fbbfc1.tar.gz
Add features required for basic userland management utility:
- implement user-initiated background drive rebuild - implement user-initiated background consistency check - log controller-initiated background rebuild/check operations Try to fix the elusive "invalid log operation" bug, and panic if we do hit this one in the hopes of getting better information. Tidy up diagnostic messages. Try to use disk_create/disk_destroy correctly. This isn't working properly yet, but it's not clear whose fault that is.
Diffstat (limited to 'sys/dev/mlx/mlxio.h')
-rw-r--r--sys/dev/mlx/mlxio.h48
1 files changed, 26 insertions, 22 deletions
diff --git a/sys/dev/mlx/mlxio.h b/sys/dev/mlx/mlxio.h
index 984b223..f091bef 100644
--- a/sys/dev/mlx/mlxio.h
+++ b/sys/dev/mlx/mlxio.h
@@ -31,32 +31,15 @@
/*
* System Disk ioctls
*/
-struct mlxd_rebuild
-{
- int rb_channel;
- int rb_target;
-};
-struct mlxd_rebuild_status
-{
- int rs_drive;
- int rs_size;
- int rs_remaining;
-};
-
-#define MLXD_STATUS _IOR ('M', 100, int)
-#define MLXD_REBUILDASYNC _IOW ('M', 101, struct mlxd_rebuild)
-#define MLXD_CHECKASYNC _IOW ('M', 102, int)
-#define MLXD_REBUILDSTAT _IOR ('M', 103, struct mlxd_rebuild_status)
-
-/*
- * System Disk status values
- */
+/* system disk status values */
#define MLX_SYSD_ONLINE 0x03
#define MLX_SYSD_CRITICAL 0x04
-#define MLX_SYSD_REBUILD 0xfe
#define MLX_SYSD_OFFLINE 0xff
+#define MLXD_STATUS _IOR ('M', 100, int)
+#define MLXD_CHECKASYNC _IOR ('M', 101, int) /* command result returned in argument */
+
/*
* Controller ioctls
*/
@@ -85,9 +68,30 @@ struct mlx_usercommand
};
+struct mlx_rebuild_request
+{
+ int rr_channel;
+ int rr_target;
+ int rr_status;
+};
+
+struct mlx_rebuild_status
+{
+ u_int16_t rs_code;
+#define MLX_REBUILDSTAT_REBUILDCHECK 0x0000
+#define MLX_REBUILDSTAT_ADDCAPACITY 0x0400
+#define MLX_REBUILDSTAT_ADDCAPACITYINIT 0x0500
+#define MLX_REBUILDSTAT_IDLE 0xffff
+ u_int16_t rs_drive;
+ int rs_size;
+ int rs_remaining;
+};
+
#define MLX_NEXT_CHILD _IOWR('M', 0, int)
#define MLX_RESCAN_DRIVES _IO ('M', 1)
#define MLX_DETACH_DRIVE _IOW ('M', 2, int)
#define MLX_PAUSE_CHANNEL _IOW ('M', 3, struct mlx_pause)
#define MLX_COMMAND _IOWR('M', 4, struct mlx_usercommand)
-
+#define MLX_REBUILDASYNC _IOWR('M', 5, struct mlx_rebuild_request)
+#define MLX_REBUILDSTAT _IOR ('M', 6, struct mlx_rebuild_status)
+#define MLX_GET_SYSDRIVE _IOWR('M', 7, int)
OpenPOWER on IntegriCloud