Deleted Added
full compact
mlxvar.h (58188) mlxvar.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/mlxvar.h 58188 2000-03-18 02:01:37Z msmith $
26 * $FreeBSD: head/sys/dev/mlx/mlxvar.h 59136 2000-04-11 02:52:46Z msmith $
27 */
28
29/*
30 * Debugging levels:
31 * 0 - quiet, only emit warnings
32 * 1 - noisy, emit major function points and things done
33 * 2 - extremely noisy, emit trace items in loops, etc.
34 */

--- 108 unchanged lines hidden (view full) ---

143#define MLX_GEOM_256_63 1
144 int mlx_state;
145#define MLX_STATE_INTEN (1<<0) /* interrupts have been enabled */
146#define MLX_STATE_SHUTDOWN (1<<1) /* controller is shut down */
147#define MLX_STATE_OPEN (1<<2) /* control device is open */
148#define MLX_STATE_SUSPEND (1<<3) /* controller is suspended */
149 struct callout_handle mlx_timeout; /* periodic status monitor */
150 time_t mlx_lastpoll; /* last time_second we polled for status */
27 */
28
29/*
30 * Debugging levels:
31 * 0 - quiet, only emit warnings
32 * 1 - noisy, emit major function points and things done
33 * 2 - extremely noisy, emit trace items in loops, etc.
34 */

--- 108 unchanged lines hidden (view full) ---

143#define MLX_GEOM_256_63 1
144 int mlx_state;
145#define MLX_STATE_INTEN (1<<0) /* interrupts have been enabled */
146#define MLX_STATE_SHUTDOWN (1<<1) /* controller is shut down */
147#define MLX_STATE_OPEN (1<<2) /* control device is open */
148#define MLX_STATE_SUSPEND (1<<3) /* controller is suspended */
149 struct callout_handle mlx_timeout; /* periodic status monitor */
150 time_t mlx_lastpoll; /* last time_second we polled for status */
151 int mlx_lastevent; /* sequence number of the last event we recorded */
151 u_int16_t mlx_lastevent; /* sequence number of the last event we recorded */
152 int mlx_currevent; /* sequence number last time we looked */
152 int mlx_currevent; /* sequence number last time we looked */
153 int mlx_rebuild; /* if >= 0, drive is being rebuilt */
154 u_int32_t mlx_rebuildstat;/* blocks left to rebuild if active */
155 int mlx_check; /* if >= 0, drive is being checked */
153 int mlx_background; /* if != 0 rebuild or check is in progress */
154#define MLX_BACKGROUND_CHECK 1 /* we started a check */
155#define MLX_BACKGROUND_REBUILD 2 /* we started a rebuild */
156#define MLX_BACKGROUND_SPONTANEOUS 3 /* it just happened somehow */
157 struct mlx_rebuild_status mlx_rebuildstat; /* last rebuild status */
156 struct mlx_pause mlx_pause; /* pending pause operation details */
157
158 int mlx_locks; /* reentrancy avoidance */
159 int mlx_flags;
160#define MLX_SPINUP_REPORTED (1<<0) /* "spinning up drives" message displayed */
161
162 /* interface-specific accessor functions */
163 int mlx_iftype; /* interface protocol */

--- 44 unchanged lines hidden (view full) ---

208extern int mlx_shutdown(device_t dev);
209extern int mlx_suspend(device_t dev);
210extern int mlx_resume(device_t dev);
211extern d_open_t mlx_open;
212extern d_close_t mlx_close;
213extern d_ioctl_t mlx_ioctl;
214
215extern devclass_t mlx_devclass;
158 struct mlx_pause mlx_pause; /* pending pause operation details */
159
160 int mlx_locks; /* reentrancy avoidance */
161 int mlx_flags;
162#define MLX_SPINUP_REPORTED (1<<0) /* "spinning up drives" message displayed */
163
164 /* interface-specific accessor functions */
165 int mlx_iftype; /* interface protocol */

--- 44 unchanged lines hidden (view full) ---

210extern int mlx_shutdown(device_t dev);
211extern int mlx_suspend(device_t dev);
212extern int mlx_resume(device_t dev);
213extern d_open_t mlx_open;
214extern d_close_t mlx_close;
215extern d_ioctl_t mlx_ioctl;
216
217extern devclass_t mlx_devclass;
218extern devclass_t mlxd_devclass;
216
217/*
218 * Mylex System Disk driver
219 */
220struct mlxd_softc
221{
222 device_t mlxd_dev;
219
220/*
221 * Mylex System Disk driver
222 */
223struct mlxd_softc
224{
225 device_t mlxd_dev;
226 dev_t mlxd_dev_t;
223 struct mlx_softc *mlxd_controller;
224 struct mlx_sysdrive *mlxd_drive;
225 struct disk mlxd_disk;
226 struct devstat mlxd_stats;
227 struct disklabel mlxd_label;
228 int mlxd_unit;
229 int mlxd_flags;
230#define MLXD_OPEN (1<<0) /* drive is open (can't shut down) */
231};
232
233/*
234 * Interface between driver core and disk driver (should be using a bus?)
235 */
236extern int mlx_submit_buf(struct mlx_softc *sc, struct buf *bp);
237extern int mlx_submit_ioctl(struct mlx_softc *sc, struct mlx_sysdrive *drive, u_long cmd,
238 caddr_t addr, int32_t flag, struct proc *p);
239extern void mlxd_intr(void *data);
240
241
227 struct mlx_softc *mlxd_controller;
228 struct mlx_sysdrive *mlxd_drive;
229 struct disk mlxd_disk;
230 struct devstat mlxd_stats;
231 struct disklabel mlxd_label;
232 int mlxd_unit;
233 int mlxd_flags;
234#define MLXD_OPEN (1<<0) /* drive is open (can't shut down) */
235};
236
237/*
238 * Interface between driver core and disk driver (should be using a bus?)
239 */
240extern int mlx_submit_buf(struct mlx_softc *sc, struct buf *bp);
241extern int mlx_submit_ioctl(struct mlx_softc *sc, struct mlx_sysdrive *drive, u_long cmd,
242 caddr_t addr, int32_t flag, struct proc *p);
243extern void mlxd_intr(void *data);
244
245