summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx/aic7xxx.reg
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2000-11-06 20:05:38 +0000
committergibbs <gibbs@FreeBSD.org>2000-11-06 20:05:38 +0000
commit13459a7344194f03540cfd2d91e74114d63217f0 (patch)
treeee6b9de943caa6f0c590f6a368ba226cab55ea02 /sys/dev/aic7xxx/aic7xxx.reg
parent0a81eeee321ee06eb5c4bdecf10ccdf38411f692 (diff)
downloadFreeBSD-src-13459a7344194f03540cfd2d91e74114d63217f0.zip
FreeBSD-src-13459a7344194f03540cfd2d91e74114d63217f0.tar.gz
aic7xxx.c:
When restarting the sequencer, ensure that the SCBCNT register is 0. A non-zero count will prevent the setting of the CCSCBDIR bit in any future dma operations. The only time CCSCBCNT would be non-zero is if we happened to halt the dma during a reset, but even that should never happen. Better safe than sorry. When a command completes before the target responds to an ATN for a recovery command, we now notify the kernel so that any recovery operation requeued in the qinfifo can be removed safely. In the past, we did this in ahc_done(), but ahc_done() may be called without the card paused. This also avoids a recursive call to ahc_search_qinifo() which could have occurred if ahc_search_qinififo() happened to be the routine to complete a recovery action. Fix 8bit math used for adjusting the qinfifo. The index must be wrapped properly within the 256 entry array. We rely on the fact that qinfifonext is a uint8_t in most cases to handle this wrap, but we missed a few spots where the resultant calculation was promoted to an int. Change the way that we deal with aborting the first or second entry from the qinfifo. We now swap the first entry in the qinfifo with the "next queued scb" to force the sequencer to see an abort collision if we ever touch the qinififo while the sequencer is mid SCB dma. aic7xxx.reg: Add new MKMSG_FAILED sequencer interrupt. This displaced the BOGUS_TAG interrupt used in some previous sequencer code debugging. aic7xxx.seq: Increment our position in the qinfifo only once the dma is complete and we have verified that the queue has not been changed during our DMA. This simplifies code in the kernel. Protect against "instruction creep" when issuing a pausing sequencer interrupt. On at least the 7890/91/96/97, the sequencer will coast after issuing the interrupt for up to two instructions. In the past we delt with this by using carefully placed nops. Now we call a routine to issue the interrupt followed by a nop and a ret. Tell the kernel should an SCB complete with the MK_MESSAGE flag still set. This means the target ignored our ATN request. Clear the channel twice as we exit the data phase. On the aic7890/91, the S/G preload logic may require the second clearing to get the last S/G out of the FIFO. aic7xxx_freebsd.c: Don't bother searching the qinfifo for a doubly queued recovery scb in ahc_done. This case is handled by the core driver now. Free the path used to issue async callbacks after the callback is complete. aic7xxx_inline.h: Split the SCB queue routine into a routine that swaps the SCB with the "next queued SCB" and a routine that calls the swapping routine and notifies the card of the new SCB. The swapping routine is now also used by ahc_search_qinfifo.
Diffstat (limited to 'sys/dev/aic7xxx/aic7xxx.reg')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.reg7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.reg b/sys/dev/aic7xxx/aic7xxx.reg
index ed27284..01fa704 100644
--- a/sys/dev/aic7xxx/aic7xxx.reg
+++ b/sys/dev/aic7xxx/aic7xxx.reg
@@ -801,9 +801,10 @@ register INTSTAT {
* beyond the bounds of its
* command.
*/
- mask BOGUS_TAG 0xa0|SEQINT /*
- * Sequencer given an SCB with
- * a Tag value of 0xFF.
+ mask MKMSG_FAILED 0xa0|SEQINT /*
+ * Target completed command
+ * without honoring our ATN
+ * request to issue a message.
*/
mask SCBPTR_MISMATCH 0xb0|SEQINT /*
* In the SCB paging case, our
OpenPOWER on IntegriCloud