From owner-freebsd-current Sun Aug 17 02:45:54 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA19632 for current-outgoing; Sun, 17 Aug 1997 02:45:54 -0700 (PDT) Received: from silver.sms.fi (silver.sms.fi [194.111.122.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA19626; Sun, 17 Aug 1997 02:45:47 -0700 (PDT) Received: (from pete@localhost) by silver.sms.fi (8.8.6/8.7.3) id MAA00841; Sun, 17 Aug 1997 12:45:33 +0300 (EEST) Date: Sun, 17 Aug 1997 12:45:33 +0300 (EEST) Message-Id: <199708170945.MAA00841@silver.sms.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Petri Helenius To: "Justin T. Gibbs" Cc: current@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Possible aic7xxx fix. In-Reply-To: <199708120448.WAA04805@pluto.plutotech.com> References: <199708120448.WAA04805@pluto.plutotech.com> X-Mailer: VM 6.22 under 19.15p7 XEmacs Lucid Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Justin T. Gibbs writes: > For those of you who have been experiencing the "Timedout while idle" > and other aic7xxx breakage, please try the following patch and let > me know if it helps you out. > Assuming this is the same patch committed to RELENG_2_2 on 13th, I'm reporting that this does not help the problems I've been experiencing. The symptom is as earlier, when the SCSI bus reset is issued, the system hangs. Pete > Thanks > __ > Justin T. Gibbs > =========================================== > FreeBSD - Turning PCs into workstations > =========================================== > > Index: dev/aic7xxx/aic7xxx.reg > =================================================================== > RCS file: /usr/cvs/src/sys/dev/aic7xxx/aic7xxx.reg,v > retrieving revision 1.4 > diff -c -r1.4 aic7xxx.reg > *** aic7xxx.reg 1997/06/27 19:38:39 1.4 > --- aic7xxx.reg 1997/08/12 04:39:03 > *************** > *** 1079,1084 **** > --- 1079,1099 ---- > CUR_SCBID { > size 1 > } > + /* > + * Running count of commands placed in > + * the QOUTFIFO. This is cleared by the > + * kernel driver every FIFODEPTH commands. > + */ > + CMDOUTCNT { > + size 1 > + } > + /* > + * Maximum number of entries allowed in > + * the QOUT/INFIFO. > + */ > + FIFODEPTH { > + size 1 > + } > ARG_1 { > size 1 > mask SEND_MSG 0x80 > Index: dev/aic7xxx/aic7xxx.seq > =================================================================== > RCS file: /usr/cvs/src/sys/dev/aic7xxx/aic7xxx.seq,v > retrieving revision 1.74 > diff -c -r1.74 aic7xxx.seq > *** aic7xxx.seq 1997/06/27 19:38:42 1.74 > --- aic7xxx.seq 1997/08/12 04:32:54 > *************** > *** 643,648 **** > --- 643,657 ---- > > complete: > /* Post the SCB and issue an interrupt */ > + .if ( SCB_PAGING ) > + /* > + * Spin loop until there is space > + * in the QOUTFIFO. > + */ > + mov A, FIFODEPTH; > + cmp CMDOUTCNT, A je .; > + inc CMDOUTCNT; > + .endif > mov QOUTFIFO,SCB_TAG; > mvi INTSTAT,CMDCMPLT; > test SCB_CONTROL, ABORT_SCB jz dma_next_scb; > Index: i386/scsi/aic7xxx.c > =================================================================== > RCS file: /usr/cvs/src/sys/i386/scsi/aic7xxx.c,v > retrieving revision 1.120 > diff -c -r1.120 aic7xxx.c > *** aic7xxx.c 1997/07/20 16:21:34 1.120 > --- aic7xxx.c 1997/08/12 04:41:58 > *************** > *** 784,789 **** > --- 784,798 ---- > > int_cleared = 0; > while (qoutcnt = (ahc_inb(ahc, QOUTCNT) & ahc->qcntmask)) { > + if ((ahc->flags & AHC_PAGESCBS) != 0) { > + ahc->cmdoutcnt += qoutcnt; > + if (ahc->cmdoutcnt >= ahc->qfullcount) { > + pause_sequencer(ahc); > + ahc_outb(ahc, CMDOUTCNT, 0); > + unpause_sequencer(ahc, > + /*unpause_always*/FALSE); > + } > + } > for (; qoutcnt > 0; qoutcnt--) { > scb_index = ahc_inb(ahc, QOUTFIFO); > scb = ahc->scb_data->scbarray[scb_index]; > *************** > *** 2305,2310 **** > --- 2314,2322 ---- > * their QCount registers. > */ > ahc_outb(ahc, QCNTMASK, ahc->qcntmask); > + > + ahc_outb(ahc, FIFODEPTH, ahc->qfullcount); > + ahc_outb(ahc, CMDOUTCNT, 0); > > /* We don't have any waiting selections */ > ahc_outb(ahc, WAITING_SCBH, SCB_LIST_NULL); > Index: i386/scsi/aic7xxx.h > =================================================================== > RCS file: /usr/cvs/src/sys/i386/scsi/aic7xxx.h,v > retrieving revision 1.41 > diff -c -r1.41 aic7xxx.h > *** aic7xxx.h 1997/06/27 19:39:20 1.41 > --- aic7xxx.h 1997/08/12 04:36:46 > *************** > *** 265,270 **** > --- 265,271 ---- > * waiting for space in the QINFIFO. > */ > u_int8_t activescbs; > + u_int8_t cmdoutcnt; > u_int16_t needsdtr_orig; /* Targets we initiate sync neg with */ > u_int16_t needwdtr_orig; /* Targets we initiate wide neg with */ > u_int16_t needsdtr; /* Current list of negotiated targets */