Deleted Added
full compact
aacvar.h (251116) aacvar.h (254004)
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 251116 2013-05-30 00:22:07Z marius $
29 * $FreeBSD: head/sys/dev/aac/aacvar.h 254004 2013-08-06 18:55:59Z marius $
30 */
31
32#include <sys/bio.h>
33#include <sys/callout.h>
34#include <sys/lock.h>
35#include <sys/mutex.h>
36#include <sys/selinfo.h>
37#include <sys/sysctl.h>

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

57/*
58 * Driver Parameter Definitions
59 */
60
61/*
62 * The firmware interface allows for a 16-bit s/g list length. We limit
63 * ourselves to a reasonable maximum and ensure alignment.
64 */
30 */
31
32#include <sys/bio.h>
33#include <sys/callout.h>
34#include <sys/lock.h>
35#include <sys/mutex.h>
36#include <sys/selinfo.h>
37#include <sys/sysctl.h>

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

57/*
58 * Driver Parameter Definitions
59 */
60
61/*
62 * The firmware interface allows for a 16-bit s/g list length. We limit
63 * ourselves to a reasonable maximum and ensure alignment.
64 */
65#define AAC_MAXSGENTRIES 64 /* max S/G entries, limit 65535 */
65#define AAC_MAXSGENTRIES 64 /* max S/G entries, limit 65535 */
66
67/*
68 * We allocate a small set of FIBs for the adapter to use to send us messages.
69 */
70#define AAC_ADAPTER_FIBS 8
71
72/*
73 * The controller reports status events in AIFs. We hang on to a number of

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

219 struct aac_adapter_init ac_init;
220
221 /* arena within which the queue structures are kept */
222 u_int8_t ac_qbuf[sizeof(struct aac_queue_table) +
223 AAC_QUEUE_ALIGN];
224
225 /* buffer for text messages from the controller */
226 char ac_printf[AAC_PRINTF_BUFSIZE];
66
67/*
68 * We allocate a small set of FIBs for the adapter to use to send us messages.
69 */
70#define AAC_ADAPTER_FIBS 8
71
72/*
73 * The controller reports status events in AIFs. We hang on to a number of

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

219 struct aac_adapter_init ac_init;
220
221 /* arena within which the queue structures are kept */
222 u_int8_t ac_qbuf[sizeof(struct aac_queue_table) +
223 AAC_QUEUE_ALIGN];
224
225 /* buffer for text messages from the controller */
226 char ac_printf[AAC_PRINTF_BUFSIZE];
227
227
228 /* fib for synchronous commands */
229 struct aac_fib ac_sync_fib;
230};
231
232/*
233 * Interface operations
234 */
235struct aac_interface

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

401#define AAC_FLAGS_CAM_NORESET (1 << 2) /* Fake SCSI resets */
402#define AAC_FLAGS_CAM_PASSONLY (1 << 3) /* Only create pass devices */
403#define AAC_FLAGS_SG_64BIT (1 << 4) /* Use 64-bit S/G addresses */
404#define AAC_FLAGS_4GB_WINDOW (1 << 5) /* Device can access host mem
405 * 2GB-4GB range */
406#define AAC_FLAGS_NO4GB (1 << 6) /* Can't access host mem >2GB */
407#define AAC_FLAGS_256FIBS (1 << 7) /* Can only do 256 commands */
408#define AAC_FLAGS_BROKEN_MEMMAP (1 << 8) /* Broken HostPhysMemPages */
228 /* fib for synchronous commands */
229 struct aac_fib ac_sync_fib;
230};
231
232/*
233 * Interface operations
234 */
235struct aac_interface

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

401#define AAC_FLAGS_CAM_NORESET (1 << 2) /* Fake SCSI resets */
402#define AAC_FLAGS_CAM_PASSONLY (1 << 3) /* Only create pass devices */
403#define AAC_FLAGS_SG_64BIT (1 << 4) /* Use 64-bit S/G addresses */
404#define AAC_FLAGS_4GB_WINDOW (1 << 5) /* Device can access host mem
405 * 2GB-4GB range */
406#define AAC_FLAGS_NO4GB (1 << 6) /* Can't access host mem >2GB */
407#define AAC_FLAGS_256FIBS (1 << 7) /* Can only do 256 commands */
408#define AAC_FLAGS_BROKEN_MEMMAP (1 << 8) /* Broken HostPhysMemPages */
409#define AAC_FLAGS_SLAVE (1 << 9)
409#define AAC_FLAGS_SLAVE (1 << 9)
410#define AAC_FLAGS_MASTER (1 << 10)
411#define AAC_FLAGS_NEW_COMM (1 << 11) /* New comm. interface supported */
412#define AAC_FLAGS_RAW_IO (1 << 12) /* Raw I/O interface */
413#define AAC_FLAGS_ARRAY_64BIT (1 << 13) /* 64-bit array size */
414#define AAC_FLAGS_LBA_64BIT (1 << 14) /* 64-bit LBA support */
410#define AAC_FLAGS_MASTER (1 << 10)
411#define AAC_FLAGS_NEW_COMM (1 << 11) /* New comm. interface supported */
412#define AAC_FLAGS_RAW_IO (1 << 12) /* Raw I/O interface */
413#define AAC_FLAGS_ARRAY_64BIT (1 << 13) /* 64-bit array size */
414#define AAC_FLAGS_LBA_64BIT (1 << 14) /* 64-bit LBA support */
415#define AAC_FLAGS_NOMSI (1 << 31) /* Broken MSI */
415
416 u_int32_t supported_options;
417 u_int32_t scsi_method_id;
418 TAILQ_HEAD(,aac_sim) aac_sim_tqh;
419
420 struct callout aac_daemontime; /* clock daemon callout */
421
422 u_int32_t aac_max_fibs; /* max. FIB count */

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

522
523#define AACQ_REMOVE(sc, qname) (sc)->aac_qstat[qname].q_length--
524#define AACQ_INIT(sc, qname) \
525 do { \
526 sc->aac_qstat[qname].q_length = 0; \
527 sc->aac_qstat[qname].q_max = 0; \
528 } while (0)
529
416
417 u_int32_t supported_options;
418 u_int32_t scsi_method_id;
419 TAILQ_HEAD(,aac_sim) aac_sim_tqh;
420
421 struct callout aac_daemontime; /* clock daemon callout */
422
423 u_int32_t aac_max_fibs; /* max. FIB count */

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

523
524#define AACQ_REMOVE(sc, qname) (sc)->aac_qstat[qname].q_length--
525#define AACQ_INIT(sc, qname) \
526 do { \
527 sc->aac_qstat[qname].q_length = 0; \
528 sc->aac_qstat[qname].q_max = 0; \
529 } while (0)
530
530
531#define AACQ_COMMAND_QUEUE(name, index) \
532static __inline void \
533aac_initq_ ## name (struct aac_softc *sc) \
534{ \
535 TAILQ_INIT(&sc->aac_ ## name); \
536 AACQ_INIT(sc, index); \
537} \
538static __inline void \

--- 110 unchanged lines hidden ---
531#define AACQ_COMMAND_QUEUE(name, index) \
532static __inline void \
533aac_initq_ ## name (struct aac_softc *sc) \
534{ \
535 TAILQ_INIT(&sc->aac_ ## name); \
536 AACQ_INIT(sc, index); \
537} \
538static __inline void \

--- 110 unchanged lines hidden ---