Deleted Added
full compact
aacvar.h (103675) aacvar.h (110426)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/aac/aacvar.h 103675 2002-09-20 12:52:03Z phk $
29 * $FreeBSD: head/sys/dev/aac/aacvar.h 110426 2003-02-05 23:24:25Z scottl $
30 */
31
32/*
33 * Driver Parameter Definitions
34 */
35
36/*
37 * The firmware interface allows for a 16-bit s/g list length. We limit

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

105{
106 struct aac_mntobj co_mntobj;
107 device_t co_disk;
108 int co_found;
109 TAILQ_ENTRY(aac_container) co_link;
110};
111
112/*
30 */
31
32/*
33 * Driver Parameter Definitions
34 */
35
36/*
37 * The firmware interface allows for a 16-bit s/g list length. We limit

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

105{
106 struct aac_mntobj co_mntobj;
107 device_t co_disk;
108 int co_found;
109 TAILQ_ENTRY(aac_container) co_link;
110};
111
112/*
113 * Per-SIM data structure
114 */
115struct aac_sim
116{
117 device_t sim_dev;
118 int TargetsPerBus;
119 int BusNumber;
120 int InitiatorBusId;
121 struct aac_softc *aac_sc;
122 TAILQ_ENTRY(aac_sim) sim_link;
123};
124
125/*
113 * Per-disk structure
114 */
115struct aac_disk
116{
117 device_t ad_dev;
118 dev_t ad_dev_t;
119 struct aac_softc *ad_controller;
120 struct aac_container *ad_container;

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

241 sc->aac_bhandle, reg, val)
242#define AAC_GETREG2(sc, reg) bus_space_read_2 (sc->aac_btag, \
243 sc->aac_bhandle, reg)
244#define AAC_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag, \
245 sc->aac_bhandle, reg, val)
246#define AAC_GETREG1(sc, reg) bus_space_read_1 (sc->aac_btag, \
247 sc->aac_bhandle, reg)
248
126 * Per-disk structure
127 */
128struct aac_disk
129{
130 device_t ad_dev;
131 dev_t ad_dev_t;
132 struct aac_softc *ad_controller;
133 struct aac_container *ad_container;

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

254 sc->aac_bhandle, reg, val)
255#define AAC_GETREG2(sc, reg) bus_space_read_2 (sc->aac_btag, \
256 sc->aac_bhandle, reg)
257#define AAC_SETREG1(sc, reg, val) bus_space_write_1(sc->aac_btag, \
258 sc->aac_bhandle, reg, val)
259#define AAC_GETREG1(sc, reg) bus_space_read_1 (sc->aac_btag, \
260 sc->aac_bhandle, reg)
261
249TAILQ_HEAD(aac_container_tq, aac_container);
250
251/* Define the OS version specific locks */
252#if __FreeBSD_version >= 500005
253#include <sys/lock.h>
254#include <sys/mutex.h>
255typedef struct mtx aac_lock_t;
256#define AAC_LOCK_INIT(l, s) mtx_init(l, s, NULL, MTX_DEF)
257#define AAC_LOCK_ACQUIRE(l) mtx_lock(l)
258#define AAC_LOCK_RELEASE(l) mtx_unlock(l)

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

327 * returned by the controller */
328 struct bio_queue_head aac_bioq;
329 struct aac_queue_table *aac_queues;
330 struct aac_queue_entry *aac_qentries[AAC_QUEUE_COUNT];
331
332 struct aac_qstat aac_qstat[AACQ_COUNT]; /* queue statistics */
333
334 /* connected containters */
262/* Define the OS version specific locks */
263#if __FreeBSD_version >= 500005
264#include <sys/lock.h>
265#include <sys/mutex.h>
266typedef struct mtx aac_lock_t;
267#define AAC_LOCK_INIT(l, s) mtx_init(l, s, NULL, MTX_DEF)
268#define AAC_LOCK_ACQUIRE(l) mtx_lock(l)
269#define AAC_LOCK_RELEASE(l) mtx_unlock(l)

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

338 * returned by the controller */
339 struct bio_queue_head aac_bioq;
340 struct aac_queue_table *aac_queues;
341 struct aac_queue_entry *aac_qentries[AAC_QUEUE_COUNT];
342
343 struct aac_qstat aac_qstat[AACQ_COUNT]; /* queue statistics */
344
345 /* connected containters */
335 struct aac_container_tq aac_container_tqh;
346 TAILQ_HEAD(,aac_container) aac_container_tqh;
336 aac_lock_t aac_container_lock;
337
338 /* Protect the sync fib */
339#define AAC_SYNC_LOCK_FORCE (1 << 0)
340 aac_lock_t aac_sync_lock;
341
342 /* delayed activity infrastructure */
343#if __FreeBSD_version >= 500005

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

351 aac_lock_t aac_aifq_lock;
352 struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
353 int aac_aifq_head;
354 int aac_aifq_tail;
355 struct selinfo rcv_select;
356 struct proc *aifthread;
357 int aifflags;
358#define AAC_AIFFLAGS_RUNNING (1 << 0)
347 aac_lock_t aac_container_lock;
348
349 /* Protect the sync fib */
350#define AAC_SYNC_LOCK_FORCE (1 << 0)
351 aac_lock_t aac_sync_lock;
352
353 /* delayed activity infrastructure */
354#if __FreeBSD_version >= 500005

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

362 aac_lock_t aac_aifq_lock;
363 struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH];
364 int aac_aifq_head;
365 int aac_aifq_tail;
366 struct selinfo rcv_select;
367 struct proc *aifthread;
368 int aifflags;
369#define AAC_AIFFLAGS_RUNNING (1 << 0)
359#define AAC_AIFFLAGS_PENDING (1 << 1)
370#define AAC_AIFFLAGS_AIF (1 << 1)
360#define AAC_AIFFLAGS_EXIT (1 << 2)
361#define AAC_AIFFLAGS_EXITED (1 << 3)
371#define AAC_AIFFLAGS_EXIT (1 << 2)
372#define AAC_AIFFLAGS_EXITED (1 << 3)
373#define AAC_AIFFLAGS_PRINTF (1 << 4)
374#define AAC_AIFFLAGS_PENDING (AAC_AIFFLAGS_AIF | AAC_AIFFLAGS_PRINTF)
362 u_int32_t quirks;
363#define AAC_QUIRK_PERC2QC (1 << 0)
364#define AAC_QUIRK_NOCAM (1 << 1) /* No SCSI passthrough */
365#define AAC_QUIRK_CAM_NORESET (1 << 2) /* Fake SCSI resets */
366#define AAC_QUIRK_CAM_PASSONLY (1 << 3) /* Only create pass devices */
367
368 u_int32_t scsi_method_id;
375 u_int32_t quirks;
376#define AAC_QUIRK_PERC2QC (1 << 0)
377#define AAC_QUIRK_NOCAM (1 << 1) /* No SCSI passthrough */
378#define AAC_QUIRK_CAM_NORESET (1 << 2) /* Fake SCSI resets */
379#define AAC_QUIRK_CAM_PASSONLY (1 << 3) /* Only create pass devices */
380
381 u_int32_t scsi_method_id;
382 TAILQ_HEAD(,aac_sim) aac_sim_tqh;
369};
370
371
372/*
373 * Public functions
374 */
375extern void aac_free(struct aac_softc *sc);
376extern int aac_attach(struct aac_softc *sc);

--- 212 unchanged lines hidden ---
383};
384
385
386/*
387 * Public functions
388 */
389extern void aac_free(struct aac_softc *sc);
390extern int aac_attach(struct aac_softc *sc);

--- 212 unchanged lines hidden ---