diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c index af56bb55b65..ae48976cfe5 100644 --- a/sys/i386/scsi/aic7xxx.c +++ b/sys/i386/scsi/aic7xxx.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.80 1996/10/25 06:42:51 gibbs Exp $ + * $Id: aic7xxx.c,v 1.81 1996/10/28 06:10:00 gibbs Exp $ */ /* * TODO: @@ -116,7 +116,6 @@ #include #if defined(__FreeBSD__) -#include "opt_aic7xxx.h" #include #include @@ -961,15 +960,15 @@ ahc_handle_seqint(ahc, intstat) * and didn't have to fall down to async * transfers. */ - if ((ahc->sdtrpending & targ_mask) != 0 - && (saved_offset == offset)) { - /* - * Don't send an SDTR back to - * the target - */ - AHC_OUTB(ahc, RETURN_1, 0); - ahc->needsdtr &= ~targ_mask; - ahc->sdtrpending &= ~targ_mask; + if ((ahc->sdtrpending & targ_mask) != 0) { + if (saved_offset == offset) { + /* + * Don't send an SDTR back to + * the target + */ + AHC_OUTB(ahc, RETURN_1, 0); + } else + AHC_OUTB(ahc, RETURN_1, SEND_REJ; } else { /* * Send our own SDTR in reply @@ -978,18 +977,9 @@ ahc_handle_seqint(ahc, intstat) ahc_construct_sdtr(ahc, /*start_byte*/0, period, offset); AHC_OUTB(ahc, RETURN_1, SEND_MSG); - - /* - * If we aren't starting a re-negotiation - * because we had to go async in response - * to a "too low" response from the target - * clear the needsdtr flag for this target. - */ - if ((ahc->sdtrpending & targ_mask) == 0) - ahc->needsdtr &= ~targ_mask; - else - ahc->sdtrpending |= targ_mask; } + ahc->needsdtr &= ~targ_mask; + ahc->sdtrpending &= ~targ_mask; break; } case MSG_EXT_WDTR: @@ -1077,6 +1067,7 @@ ahc_handle_seqint(ahc, intstat) /* Unknown extended message. Reject it. */ AHC_OUTB(ahc, RETURN_1, SEND_REJ); } + break; } case REJECT_MSG: { @@ -1209,6 +1200,7 @@ ahc_handle_seqint(ahc, intstat) hscb->SG_segment_count = 1; hscb->SG_list_pointer = vtophys(sg); hscb->data = sg->addr; + /* Maintain SCB_LINKED_NEXT */ hscb->datalen &= 0xFF000000; hscb->datalen |= sg->len; hscb->cmdpointer = vtophys(sc); @@ -1749,7 +1741,6 @@ ahc_init(ahc) printf("%d SCBs\n", ahc->scb_data->maxhscbs); } - #ifdef AHC_DEBUG if (ahc_debug & AHC_SHOWMISC) { printf("%s: hardware scb %d bytes; kernel scb %d bytes; " diff --git a/sys/i386/scsi/aic7xxx.h b/sys/i386/scsi/aic7xxx.h index d9395351f52..02d6f3db38b 100644 --- a/sys/i386/scsi/aic7xxx.h +++ b/sys/i386/scsi/aic7xxx.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.h,v 1.30 1996/10/25 06:42:53 gibbs Exp $ + * $Id: aic7xxx.h,v 1.31 1996/10/28 06:10:02 gibbs Exp $ */ #ifndef _AIC7XXX_H_ @@ -38,6 +38,7 @@ #if defined(__FreeBSD__) #include "ahc.h" /* for NAHC from config */ +#include "opt_aic7xxx.h" /* for config options */ #endif #if defined(__NetBSD__)