Deleted Added
full compact
mlxvar.h (54419) mlxvar.h (54979)
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 54419 1999-12-11 00:00:13Z msmith $
26 * $FreeBSD: head/sys/dev/mlx/mlxvar.h 54979 1999-12-22 01:21:28Z msmith $
27 */
28
29/*
30 * We could actually use all 33 segments, but using only 32 means that
31 * each scatter/gather map is 256 bytes in size, and thus we don't have to worry about
32 * maps crossing page boundaries.
33 */
34#define MLX_NSEG 32 /* max scatter/gather segments we use */

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

100
101 /* scatter/gather lists and their controller-visible mappings */
102 struct mlx_sgentry *mlx_sgtable; /* s/g lists */
103 u_int32_t mlx_sgbusaddr; /* s/g table base address in bus space */
104 bus_dma_tag_t mlx_sg_dmat; /* s/g buffer DMA tag */
105 bus_dmamap_t mlx_sg_dmamap; /* map for s/g buffers */
106
107 /* controller limits and features */
27 */
28
29/*
30 * We could actually use all 33 segments, but using only 32 means that
31 * each scatter/gather map is 256 bytes in size, and thus we don't have to worry about
32 * maps crossing page boundaries.
33 */
34#define MLX_NSEG 32 /* max scatter/gather segments we use */

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

100
101 /* scatter/gather lists and their controller-visible mappings */
102 struct mlx_sgentry *mlx_sgtable; /* s/g lists */
103 u_int32_t mlx_sgbusaddr; /* s/g table base address in bus space */
104 bus_dma_tag_t mlx_sg_dmat; /* s/g buffer DMA tag */
105 bus_dmamap_t mlx_sg_dmamap; /* map for s/g buffers */
106
107 /* controller limits and features */
108 int mlx_hwid; /* hardware identifier */
109 int mlx_maxiop; /* maximum number of I/O operations */
110 int mlx_nchan; /* number of active channels */
111 int mlx_maxiosize; /* largest I/O for this controller */
112 int mlx_maxtarg; /* maximum number of targets per channel */
113 int mlx_maxtags; /* maximum number of tags per device */
114 int mlx_scsicap; /* SCSI capabilities */
108 struct mlx_enquiry2 *mlx_enq2;
109 int mlx_maxiop; /* hard maximum number of commands */
115 int mlx_feature; /* controller features/quirks */
116#define MLX_FEAT_PAUSEWORKS (1<<0) /* channel pause works as expected */
117
118 /* controller queues and arrays */
119 TAILQ_HEAD(, mlx_command) mlx_freecmds; /* command structures available for reuse */
120 TAILQ_HEAD(, mlx_command) mlx_work; /* active commands */
121 struct mlx_command *mlx_busycmd[MLX_NSLOTS]; /* busy commands */
122 int mlx_busycmds; /* count of busy commands */
123 struct mlx_sysdrive mlx_sysdrive[MLX_MAXDRIVES]; /* system drives */
124 struct buf_queue_head mlx_bufq; /* outstanding I/O operations */
125 int mlx_waitbufs; /* number of bufs awaiting commands */
126
127 /* controller status */
110 int mlx_feature; /* controller features/quirks */
111#define MLX_FEAT_PAUSEWORKS (1<<0) /* channel pause works as expected */
112
113 /* controller queues and arrays */
114 TAILQ_HEAD(, mlx_command) mlx_freecmds; /* command structures available for reuse */
115 TAILQ_HEAD(, mlx_command) mlx_work; /* active commands */
116 struct mlx_command *mlx_busycmd[MLX_NSLOTS]; /* busy commands */
117 int mlx_busycmds; /* count of busy commands */
118 struct mlx_sysdrive mlx_sysdrive[MLX_MAXDRIVES]; /* system drives */
119 struct buf_queue_head mlx_bufq; /* outstanding I/O operations */
120 int mlx_waitbufs; /* number of bufs awaiting commands */
121
122 /* controller status */
128 u_int8_t mlx_fwminor; /* firmware revision */
129 u_int8_t mlx_fwmajor;
130 int mlx_geom;
131#define MLX_GEOM_128_32 0 /* geoemetry translation modes */
132#define MLX_GEOM_256_63 1
133 int mlx_state;
134#define MLX_STATE_INTEN (1<<0) /* interrupts have been enabled */
135#define MLX_STATE_SHUTDOWN (1<<1) /* controller is shut down */
136#define MLX_STATE_OPEN (1<<2) /* control device is open */
137#define MLX_STATE_SUSPEND (1<<3) /* controller is suspended */
138 struct callout_handle mlx_timeout; /* periodic status monitor */
139 time_t mlx_lastpoll; /* last time_second we polled for status */
123 int mlx_geom;
124#define MLX_GEOM_128_32 0 /* geoemetry translation modes */
125#define MLX_GEOM_256_63 1
126 int mlx_state;
127#define MLX_STATE_INTEN (1<<0) /* interrupts have been enabled */
128#define MLX_STATE_SHUTDOWN (1<<1) /* controller is shut down */
129#define MLX_STATE_OPEN (1<<2) /* control device is open */
130#define MLX_STATE_SUSPEND (1<<3) /* controller is suspended */
131 struct callout_handle mlx_timeout; /* periodic status monitor */
132 time_t mlx_lastpoll; /* last time_second we polled for status */
140 u_int16_t mlx_lastevent; /* sequence number of the last event we recorded */
141 u_int16_t mlx_currevent; /* sequence number last time we looked */
142 int mlx_polling; /* if > 0, polling operations still running */
133 int mlx_lastevent; /* sequence number of the last event we recorded */
134 int mlx_currevent; /* sequence number last time we looked */
143 int mlx_rebuild; /* if >= 0, drive is being rebuilt */
144 u_int32_t mlx_rebuildstat;/* blocks left to rebuild if active */
145 int mlx_check; /* if >= 0, drive is being checked */
146 struct mlx_pause mlx_pause; /* pending pause operation details */
147
148 int mlx_locks; /* reentrancy avoidance */
149
150 /* interface-specific accessor functions */

--- 77 unchanged lines hidden ---
135 int mlx_rebuild; /* if >= 0, drive is being rebuilt */
136 u_int32_t mlx_rebuildstat;/* blocks left to rebuild if active */
137 int mlx_check; /* if >= 0, drive is being checked */
138 struct mlx_pause mlx_pause; /* pending pause operation details */
139
140 int mlx_locks; /* reentrancy avoidance */
141
142 /* interface-specific accessor functions */

--- 77 unchanged lines hidden ---