From fc2aa1d1b8213039f5758351c7c58e6a2e1fc7fc Mon Sep 17 00:00:00 2001 From: Scott Long Date: Sun, 1 Dec 2002 07:54:53 +0000 Subject: 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) --- sys/dev/aic7xxx/aic79xx_inline.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/aic7xxx/aic79xx_inline.h b/sys/dev/aic7xxx/aic79xx_inline.h index 1992c491b42c8..42811450a1e99 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) -- cgit v1.3