Lines Matching +full:max +full:- +full:bits +full:- +full:per +full:- +full:word
1 /*-
4 * SPDX-License-Identifier: BSD-3-Clause
6 * Copyright (c) 1994-2002 Justin T. Gibbs.
7 * Copyright (c) 2000-2002 Adaptec Inc.
21 * 3. Neither the names of the above-listed copyright holders nor the names
56 #ifndef MAX
57 #define MAX(a,b) (((a) > (b)) ? (a) : (b))
88 SCSIID_OUR_ID((scb)->hscb->scsiid)
90 SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
92 SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
94 ((scb)->hscb->lun)
102 && (((scb)->flags & SCB_SILENT) != 0))
105 (((scb)->flags & SCB_SILENT) != 0)
113 (tcl & (AHD_NUM_LUNS - 1))
120 aic_le16toh(scb->hscb->tag)
135 (scb)->hscb->scsiid = ((col_idx) << TID_SHIFT) & TID; \
136 (scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \
141 dst->hscb->scsiid = src->hscb->scsiid; \
142 dst->hscb->lun = src->hscb->lun; \
155 * The identify message only supports 64 luns in non-packetized transfers.
163 * The maximum transfer per S/G segment.
175 * The maximum number of concurrent transactions supported per driver instance.
176 * Sequencer Control Blocks (SCBs) store per-transaction information.
187 #define AHD_QIN_WRAP(x) ((x) & (AHD_QIN_SIZE-1))
227 AHD_MULTI_FUNC = 0x00100,/* Multi-Function/Channel Device */
234 AHD_REMOVABLE = 0x00000,/* Hot-Swap supported - None so far*/
256 /* The Non-LQ CRC error status is delayed until phase change. */
262 /* MMAPIO is not functional in PCI-X mode. */
266 /* Bug workarounds that can be disabled on non-PCIX busses. */
272 * to perform non-packetized message delivery.
275 /* FIFO auto-flush does not always trigger. */
277 /* The CLRLQO registers are not self-clearing. */
284 * Only the FIFO allocated to the non-packetized connection may
285 * be in use during a non-packetzied connection.
293 * occur in non-packetized connections.
304 /* Non-packetized busfree revision does not work. */
307 * Paced transfers are indicated with a non-standard PPR
387 * The driver keeps up to MAX_SCB scb structures per card in memory. The SCB
419 uint8_t data_phase; /* Data-In or Data-Out */
432 #define MAX_CDB_LEN_WITH_SENSE_ADDR (MAX_CDB_LEN - sizeof(sense_addr_t))
452 uint8_t data_phase; /* Data-In or Data-Out */
464 * A word about residuals.
482 * there is non-zero status, it will set the SG_STATUS_VALID flag in
507 * Our Id (bits 0-3) Their ID (bits 4-7)
534 * the length to store additional address bits and a flag to indicate
654 * Per-device lists of SCBs whose tag ID would collide
695 * Connection descriptor for select-in requests in target mode.
707 * will set cmd_valid to all bits set.
709 * the bits are cleared. This allows us
732 * Per enabled lun target mode state.
776 * Per-initiator current, goal and user transfer negotiation information. */
784 * Per enabled target ID state.
786 * for each initiator<->target mapping. For the initiator role we pretend
795 * Per initiator state bitmasks.
832 * Phase -> name and message out response
845 * Per SCSI ID Configuration Flags
847 uint16_t device_flags[16]; /* words 0-15 */
860 * BIOS Control Bits
862 uint16_t bios_control; /* word 16 */
870 #define CFCTRL_A 0x0020 /* BIOS displays Ctrl-A message */
873 #define CFBOOTCD 0x0100 /* Support Bootable CD-ROM */
882 * Host Adapter Control Bits
884 uint16_t adapter_control; /* word 17 */
899 uint16_t brtime_id; /* word 18 */
907 uint16_t max_targets; /* word 19 */
911 uint16_t res_1[10]; /* words 20-29 */
914 uint16_t checksum; /* word 31 */
1077 (((sc)->summerr[AHD_ERRORS_CORRECTABLE])++)
1079 (((sc)->summerr[AHD_ERRORS_UNCORRECTABLE])++)
1081 (((sc)->summerr[AHD_ERRORS_FATAL])++)
1094 #define AIC_SCB_DATA(softc) (&(softc)->scb_data)
1144 * Target mode related state kept on a per enabled lun basis.
1272 /* PCI-X capability offset. */
1281 /* Per-Unit descriptive information */
1315 (AHD_ANNEXCOL_PRECOMP_SLEW - AHD_ANNEXCOL_PER_DEV0)
1318 (AHD_ANNEXCOL_AMPLITUDE - AHD_ANNEXCOL_PER_DEV0)
1322 (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_SLEWRATE_MASK; \
1323 (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |= \
1329 (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_PRECOMP_MASK; \
1330 (ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |= \
1336 (ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] &= ~AHD_AMPLITUDE_MASK; \
1337 (ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] |= \
1510 AHD_NEG_IF_NON_ASYNC, /* Renegotiate so long as goal is non-async. */