From ebada55cce0e7e60c5fc56fddec4358fbcc21165 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sat, 22 May 1999 22:04:11 +0000 Subject: [PATCH] aic7xxx.c: Honor the 'bus reset at startup' option now that the XPT properly handles transfer negotiation in this scenario. Honor the sync rate settings on Ultra2 controllers. We would always negotiate at the fastest speed. Oops. aic7xxx.h: Whitespace. aic7xxx.seq: Fix a minor nit that would cause the controller to miss the update of the negotiation required bitmask causing the negotiation to be delayed by a command. --- sys/dev/aic7xxx/aic7xxx.c | 19 +++++-------------- sys/dev/aic7xxx/aic7xxx.h | 4 ++-- sys/dev/aic7xxx/aic7xxx.seq | 5 +++-- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 5e6400c039f..7f243f61a17 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -36,7 +36,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.28 1999/05/17 21:53:50 gibbs Exp $ + * $Id: aic7xxx.c,v 1.29 1999/05/18 03:58:49 gibbs Exp $ */ /* * A few notes on features of the driver. @@ -3805,7 +3805,7 @@ ahc_init(struct ahc_softc *ahc) } /* DMA tag for mapping buffers into device visible space. */ - if (bus_dma_tag_create(ahc->parent_dmat, /*alignment*/0, /*boundary*/0, + if (bus_dma_tag_create(ahc->parent_dmat, /*alignment*/0, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, @@ -3951,14 +3951,9 @@ ahc_init(struct ahc_softc *ahc) ahc_outb(ahc, SIMODE1, ENSELTIMO|ENSCSIRST|ENSCSIPERR); ahc_outb(ahc, SXFRCTL0, DFON|SPIOEN); -#if 0 if ((scsi_conf & RESET_SCSI) != 0 && (ahc->flags & AHC_INITIATORMODE) != 0) ahc->flags |= AHC_RESET_BUS_B; -#else - if ((ahc->flags & AHC_INITIATORMODE) != 0) - ahc->flags |= AHC_RESET_BUS_B; -#endif /* Select Channel A */ ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~SELBUSB); @@ -3975,14 +3970,9 @@ ahc_init(struct ahc_softc *ahc) ahc_outb(ahc, SIMODE1, ENSELTIMO|ENSCSIRST|ENSCSIPERR); ahc_outb(ahc, SXFRCTL0, DFON|SPIOEN); -#if 0 if ((scsi_conf & RESET_SCSI) != 0 && (ahc->flags & AHC_INITIATORMODE) != 0) ahc->flags |= AHC_RESET_BUS_A; -#else - if ((ahc->flags & AHC_INITIATORMODE) != 0) - ahc->flags |= AHC_RESET_BUS_A; -#endif /* * Look at the information that board initialization or @@ -4067,8 +4057,9 @@ ahc_init(struct ahc_softc *ahc) offset = MAX_OFFSET_ULTRA2; } else offset = ahc_inb(ahc, TARG_OFFSET + i); - ahc_find_period(ahc, scsirate, - AHC_SYNCRATE_ULTRA2); + tinfo->user.period = + ahc_find_period(ahc, scsirate, + AHC_SYNCRATE_ULTRA2); if (offset == 0) tinfo->user.period = 0; else diff --git a/sys/dev/aic7xxx/aic7xxx.h b/sys/dev/aic7xxx/aic7xxx.h index 3fda7294dc8..c4243660883 100644 --- a/sys/dev/aic7xxx/aic7xxx.h +++ b/sys/dev/aic7xxx/aic7xxx.h @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.h,v 1.8 1999/05/14 05:07:23 gibbs Exp $ + * $Id: aic7xxx.h,v 1.9 1999/05/17 21:53:51 gibbs Exp $ */ #ifndef _AIC7XXX_H_ @@ -226,7 +226,7 @@ struct hardware_scb { * Address of command store for * 32byte SCB adapters */ -/*48*/ u_int8_t spare_64[12]; /* +/*48*/ u_int8_t spare_64[12]; /* * Pad to 64 bytes. */ }; diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 1d89027ca7a..bc333f4d826 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.seq,v 1.87 1999/03/23 07:24:28 gibbs Exp $ + * $Id: aic7xxx.seq,v 1.88 1999/05/14 05:07:25 gibbs Exp $ */ #include @@ -1024,7 +1024,6 @@ p_mesgout: test SCB_CONTROL,MK_MESSAGE jnz host_message_loop; mov FUNCTION1, SCB_TCL; mov A, FUNCTION1; - mov SINDEX, TARGET_MSG_REQUEST[0]; if ((ahc->features & AHC_HS_MAILBOX) != 0) { /* * Work around a pausing bug in at least the aic7890. @@ -1036,7 +1035,9 @@ p_mesgout: */ test HS_MAILBOX, 0xF0 jz . + 2; mvi INTSTAT, UPDATE_TMSG_REQ; + nop; } + mov SINDEX, TARGET_MSG_REQUEST[0]; if ((ahc->features & AHC_TWIN) != 0) { /* Second Channel uses high byte bits */ test SCB_TCL, SELBUSB jz . + 2;