1 /* $NetBSD: raidframeio.h,v 1.5 2009/01/18 16:37:19 christos Exp $ */
3 * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
6 * This code is derived from software contributed to The NetBSD Foundation
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
18 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
32 * Copyright (c) 1995 Carnegie-Mellon University.
33 * All rights reserved.
35 * Author: Mark Holland
37 * Permission to use, copy, modify and distribute this software and
38 * its documentation is hereby granted, provided that both the copyright
39 * notice and this permission notice appear in all copies of the
40 * software, derivative works or modified versions, and any portions
41 * thereof, and that both notices appear in supporting documentation.
43 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
44 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
45 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
47 * Carnegie Mellon requests users of this software to return to
49 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
50 * School of Computer Science
51 * Carnegie Mellon University
52 * Pittsburgh PA 15213-3890
54 * any improvements or extensions that they make and grant Carnegie the
55 * rights to redistribute these changes.
58 /*****************************************************
62 * IOCTL's used by RAIDframe.
64 *****************************************************/
67 #ifndef _RF_RAIDFRAMEIO_H_
68 #define _RF_RAIDFRAMEIO_H_
70 #include "raidframevar.h"
72 /* 1 was RAIDFRAME_CONFIGURE */
73 #define RAIDFRAME_SHUTDOWN _IO ('r', 2) /* shutdown the driver */
74 #define RAIDFRAME_TUR _IOW ('r', 3, dev_t) /* debug only: test unit
76 #define RAIDFRAME_TEST_ACC _IOWR('r', 4, struct rf_test_acc) /* run a test access */
77 #define RAIDFRAME_FAIL_DISK _IOW ('r', 5, struct rf_recon_req) /* fail a disk &
80 #define RAIDFRAME_CHECK_RECON_STATUS _IOWR('r', 6, int) /* get reconstruction %
81 * complete on indicated
83 #define RAIDFRAME_REWRITEPARITY _IO ('r', 7) /* rewrite (initialize)
85 #define RAIDFRAME_COPYBACK _IO ('r', 8) /* copy reconstructed
86 * data back to replaced
88 #define RAIDFRAME_SPARET_WAIT _IOR ('r', 9, RF_SparetWait_t) /* does not return until
89 * kernel needs a spare
91 #define RAIDFRAME_SEND_SPARET _IOW ('r', 10, void *) /* used to send a spare
94 #define RAIDFRAME_ABORT_SPARET_WAIT _IO ('r', 11) /* used to wake up the
97 #define RAIDFRAME_START_ATRACE _IO ('r', 12) /* start tracing
99 #define RAIDFRAME_STOP_ATRACE _IO ('r', 13) /* stop tracing accesses */
100 #define RAIDFRAME_GET_SIZE _IOR ('r', 14, int) /* get size (# sectors)
102 /* 15 was RAIDFRAME_GET_INFO */
103 #define RAIDFRAME_RESET_ACCTOTALS _IO ('r', 16) /* reset AccTotals for
105 #define RAIDFRAME_GET_ACCTOTALS _IOR ('r', 17, RF_AccTotals_t) /* retrieve AccTotals
107 #define RAIDFRAME_KEEP_ACCTOTALS _IOW ('r', 18, int) /* turn AccTotals on or
109 #define RAIDFRAME_GET_COMPONENT_LABEL _IOWR ('r', 19, RF_ComponentLabel_t *)
110 #define RAIDFRAME_SET_COMPONENT_LABEL _IOW ('r', 20, RF_ComponentLabel_t)
112 #define RAIDFRAME_INIT_LABELS _IOW ('r', 21, RF_ComponentLabel_t)
113 #define RAIDFRAME_ADD_HOT_SPARE _IOW ('r', 22, RF_SingleComponent_t)
114 #define RAIDFRAME_REMOVE_HOT_SPARE _IOW ('r', 23, RF_SingleComponent_t)
115 #define RAIDFRAME_REBUILD_IN_PLACE _IOW ('r', 24, RF_SingleComponent_t)
116 #define RAIDFRAME_CHECK_PARITY _IOWR ('r', 25, int)
117 #define RAIDFRAME_CHECK_PARITYREWRITE_STATUS _IOWR ('r', 26, int)
118 #define RAIDFRAME_CHECK_COPYBACK_STATUS _IOWR ('r', 27, int)
119 #define RAIDFRAME_SET_AUTOCONFIG _IOWR ('r', 28, int)
120 #define RAIDFRAME_SET_ROOT _IOWR ('r', 29, int)
121 #define RAIDFRAME_DELETE_COMPONENT _IOW ('r', 30, RF_SingleComponent_t)
122 #define RAIDFRAME_INCORPORATE_HOT_SPARE _IOW ('r', 31, RF_SingleComponent_t)
123 /* 'Extended' status versions */
124 #define RAIDFRAME_CHECK_RECON_STATUS_EXT _IOWR('r', 32, RF_ProgressInfo_t *)
125 #define RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT _IOWR ('r', 33, RF_ProgressInfo_t *)
126 #define RAIDFRAME_CHECK_COPYBACK_STATUS_EXT _IOWR ('r', 34, RF_ProgressInfo_t *)
127 #define RAIDFRAME_CONFIGURE _IOW ('r', 35, void *) /* configure the driver */
128 #define RAIDFRAME_GET_INFO _IOWR('r', 36, RF_DeviceConfig_t *) /* get configuration */
130 #define RAIDFRAME_PARITYMAP_STATUS _IOR('r', 37, struct rf_pmstat)
131 #define RAIDFRAME_PARITYMAP_GET_DISABLE _IOR('r', 38, int)
132 #define RAIDFRAME_PARITYMAP_SET_DISABLE _IOW('r', 39, int)
133 #define RAIDFRAME_PARITYMAP_SET_PARAMS _IOW('r', 40, struct rf_pmparams)
135 #endif /* !_RF_RAIDFRAMEIO_H_ */