Lines Matching full:scb
77 #define SCB_IS_SCSIBUS_B(ahc, scb) \ argument
78 (SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid) == 'B')
79 #define SCB_GET_OUR_ID(scb) \ argument
80 SCSIID_OUR_ID((scb)->hscb->scsiid)
81 #define SCB_GET_TARGET(ahc, scb) \ argument
82 SCSIID_TARGET((ahc), (scb)->hscb->scsiid)
83 #define SCB_GET_CHANNEL(ahc, scb) \ argument
84 SCSIID_CHANNEL(ahc, (scb)->hscb->scsiid)
85 #define SCB_GET_LUN(scb) \ argument
86 ((scb)->hscb->lun & LID)
87 #define SCB_GET_TARGET_OFFSET(ahc, scb) \ argument
88 (SCB_GET_TARGET(ahc, scb) + (SCB_IS_SCSIBUS_B(ahc, scb) ? 8 : 0))
89 #define SCB_GET_TARGET_MASK(ahc, scb) \ argument
90 (0x01 << (SCB_GET_TARGET_OFFSET(ahc, scb)))
92 #define SCB_IS_SILENT(scb) \ argument
94 && (((scb)->flags & SCB_SILENT) != 0))
96 #define SCB_IS_SILENT(scb) \ argument
97 (((scb)->flags & SCB_SILENT) != 0)
131 * The maximum amount of SCB storage in hardware on a controller.
145 * 3) Our input queue scheme requires one SCB to always be reserved
158 * The maximum amount of SCB storage we allocate in host memory. This
159 * number should reflect the 1 additional SCB we require to handle our
297 * An SCB upload using the SCB channel's
347 * stored in SCB space rather
352 AHC_PAGESCBS = 0x400000, /* Enable SCB paging */
362 /************************* Hardware SCB Definition ***************************/
365 * The driver keeps up to MAX_SCB scb structures per card in memory. The SCB
366 * consists of a "hardware SCB" mirroring the fields available on the card
369 * To minimize space utilization, a portion of the hardware scb stores
382 * an SCB after passing the cdb to the target. The kernel
393 * Target mode version of the shared data SCB segment.
408 * in the SCB. For longer cdbs, we embed the address
419 * The scb is presented to the sequencer with the dataptr and datacnt
436 * will set the SG_RESID_VALID flag in sgptr and dma the scb back into
447 * o A residual has occurred if a completed scb has the
466 * Index into our kernel SCB array.
475 * "Disconnected SCB" lists down
489 /************************ Kernel SCB Definitions ******************************/
491 * Some fields of the SCB are OS dependent. Here we collect the
493 * in there SCB definition.
520 * The current state of this SCB.
527 * this SCB so we gave ourselves
561 struct scb { struct
564 SLIST_ENTRY(scb) sle; argument
565 TAILQ_ENTRY(scb) tqe;
567 LIST_ENTRY(scb) pending_links; argument
579 SLIST_HEAD(, scb) free_scbs; /* argument
583 struct scb *scbindex[256]; /*
584 * Mapping from tag to SCB.
593 struct scb *scbarray; /* Array of kernel SCBs */
594 struct scsi_sense_data *sense; /* Per SCB sense data */
599 bus_dma_tag_t hscb_dmat; /* dmat for our hardware SCB array */
866 TAILQ_HEAD(scb_tailq, scb);
908 struct scb *next_queued_scb;
913 BSD_LIST_HEAD(, scb) pending_scbs;
1147 /************************** SCB and SCB queue management **********************/
1150 struct scb *scb);
1151 int ahc_match_scb(struct ahc_softc *ahc, struct scb *scb,