summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2002-12-01 07:54:53 +0000
committerscottl <scottl@FreeBSD.org>2002-12-01 07:54:53 +0000
commit30b77bf7809e2bb17b71103bb73a484c9fc0e93f (patch)
tree36dc371722982a879f49b173ab904ed7f34e7eed /sys/dev/aic7xxx
parent0428f86e148ea23110a9ef8b1f51e2bf2c85214f (diff)
downloadFreeBSD-src-30b77bf7809e2bb17b71103bb73a484c9fc0e93f.zip
FreeBSD-src-30b77bf7809e2bb17b71103bb73a484c9fc0e93f.tar.gz
Add our controller name to the front of our
diagnostic "Setting Mode" messages. Use a read of HCNTRL to flush our write to CLRCMDCMPLT on the RevB. This allows us to check to see if the sequencer is paused and to initiate the interrupt collision workaround without incuring an extra read. Approved by: re (blanket)
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic79xx_inline.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/aic7xxx/aic79xx_inline.h b/sys/dev/aic7xxx/aic79xx_inline.h
index 1992c49..4281145 100644
--- a/sys/dev/aic7xxx/aic79xx_inline.h
+++ b/sys/dev/aic7xxx/aic79xx_inline.h
@@ -37,7 +37,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#36 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#39 $
*
* $FreeBSD$
*/
@@ -109,7 +109,7 @@ ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
|| ahd->dst_mode == AHD_MODE_UNKNOWN)
panic("Setting mode prior to saving it.\n");
if ((ahd_debug & AHD_SHOW_MODEPTR) != 0)
- printf("Setting mode 0x%x\n",
+ printf("%s: Setting mode 0x%x\n", ahd_name(ahd),
ahd_build_mode_state(ahd, src, dst));
#endif
ahd_outb(ahd, MODE_PTR, ahd_build_mode_state(ahd, src, dst));
@@ -265,6 +265,7 @@ static __inline void
ahd_setup_scb_common(struct ahd_softc *ahd, struct scb *scb)
{
/* XXX Handle target mode SCBs. */
+ scb->crc_retry_count = 0;
if ((scb->flags & SCB_PACKETIZED) != 0) {
/* XXX what about ACA?? It is type 4, but TAG_TYPE == 0x3. */
scb->hscb->task_attribute= scb->hscb->control & SCB_TAG_TYPE;
@@ -898,7 +899,19 @@ ahd_intr(struct ahd_softc *ahd)
* and after the sequencer has added new entries
* and asserted the interrupt again.
*/
- ahd_flush_device_writes(ahd);
+ if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) {
+ if (ahd_is_paused(ahd)) {
+ /*
+ * Potentially lost SEQINT.
+ * If SEQINTCODE is non-zero,
+ * simulate the SEQINT.
+ */
+ if (ahd_inb(ahd, SEQINTCODE) != NO_SEQINT)
+ intstat |= SEQINT;
+ }
+ } else {
+ ahd_flush_device_writes(ahd);
+ }
ahd_run_qoutfifo(ahd);
#ifdef AHD_TARGET_MODE
if ((ahd->flags & AHD_TARGETROLE) != 0)
OpenPOWER on IntegriCloud