<dec f='src/src/sys/dev/ic/aic7xxxvar.h' l='566'/>
<dec f='src/src/sys/dev/ic/aic79xxvar.h' l='502'/>
<use f='src/src/sys/dev/ic/aic79xx.c' l='616' u='c'/>
<use f='src/src/sys/dev/ic/aic79xx.c' l='736' u='c'/>
<use f='src/src/sys/dev/ic/aic79xx.c' l='4808' u='c'/>
<use f='src/src/sys/dev/ic/aic79xx.c' l='4945' u='c'/>
<use f='src/src/sys/dev/ic/aic79xx.c' l='8101' u='c'/>
<use f='src/src/sys/dev/ic/aic79xx.c' l='8112' u='c'/>
<doc f='src/src/sys/dev/ic/aic79xxvar.h' l='463'>/*
 * A word about residuals.
 * The scb is presented to the sequencer with the dataptr and datacnt
 * fields initialized to the contents of the first S/G element to
 * transfer.  The sgptr field is initialized to the bus address for
 * the S/G element that follows the first in the in core S/G array
 * or&apos;ed with the SG_FULL_RESID flag.  Sgptr may point to an invalid
 * S/G entry for this transfer (single S/G element transfer with the
 * first elements address and length preloaded in the dataptr/datacnt
 * fields).  If no transfer is to occur, sgptr is set to SG_LIST_NULL.
 * The SG_FULL_RESID flag ensures that the residual will be correctly
 * noted even if no data transfers occur.  Once the data phase is entered,
 * the residual sgptr and datacnt are loaded from the sgptr and the
 * datacnt fields.  After each S/G element&apos;s dataptr and length are
 * loaded into the hardware, the residual sgptr is advanced.  After
 * each S/G element is expired, its datacnt field is checked to see
 * if the LAST_SEG flag is set.  If so, SG_LIST_NULL is set in the
 * residual sg ptr and the transfer is considered complete.  If the
 * sequencer determines that there is a residual in the transfer, or
 * there is non-zero status, it will set the SG_STATUS_VALID flag in
 * sgptr and DMA the scb back into host memory.  To summarize:
 *
 * Sequencer:
 *	o A residual has occurred if SG_FULL_RESID is set in sgptr,
 *	  or residual_sgptr does not have SG_LIST_NULL set.
 *
 *	o We are transfering the last segment if residual_datacnt has
 *	  the SG_LAST_SEG flag set.
 *
 * Host:
 *	o A residual can only have occurred if a completed scb has the
 *	  SG_STATUS_VALID flag set.  Inspection of the SCSI status field,
 *	  the residual_datacnt, and the residual_sgptr field will tell
 *	  for sure.
 *
 *	o residual_sgptr and sgptr refer to the &quot;next&quot; sg entry
 *	  and so may point beyond the last valid sg entry for the
 *	  transfer.
 */</doc>
<use f='src/src/sys/dev/ic/aic7xxx.c' l='3611' u='c'/>
<use f='src/src/sys/dev/ic/aic7xxx.c' l='3690' u='c'/>
<use f='src/src/sys/dev/ic/aic7xxx.c' l='6129' u='c'/>
<use f='src/src/sys/dev/ic/aic7xxx.c' l='6139' u='c'/>
