Fix a nasty bug that meant a QUEUE_FULL status would result in a lost

SCB.  This is probably a main reason for the recent reports of timeouts.
This commit is contained in:
gibbs 1997-03-24 05:05:18 +00:00
parent bc569a7a8f
commit 4626bcf70b

View File

@ -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.106 1997/03/16 07:12:07 gibbs Exp $
* $Id: aic7xxx.c,v 1.107 1997/03/23 06:33:36 bde Exp $
*/
/*
* TODO:
@ -813,8 +813,7 @@ ahc_intr(arg)
scb->xs->error);
ahc_run_done_queue(ahc);
}
if (scb->hscb->status != SCSI_QUEUE_FULL)
ahc_done(ahc, scb);
ahc_done(ahc, scb);
}
ahc_outb(ahc, CLRINT, CLRCMDINT);
int_cleared++;
@ -1335,13 +1334,8 @@ ahc_handle_seqint(ahc, intstat)
/*
* XXX requeue this unconditionally.
*/
STAILQ_INSERT_TAIL(&ahc->waiting_scbs, scb,
links);
scb->flags |= SCB_WAITINGQ;
/* Give the command a new lease on life */
untimeout(ahc_timeout, (caddr_t)scb);
timeout(ahc_timeout, (caddr_t)scb,
(scb->xs->timeout * hz) / 1000);
scb->xs->retries++;
scb->xs->error = XS_BUSY;
break;
}
/* Else treat as if it is a BUSY condition */
@ -2567,7 +2561,12 @@ ahc_run_waiting_queue(ahc)
{
struct scb *scb;
pause_sequencer(ahc);
/*
* On aic78X0 chips, we rely on Auto Access Pause (AAP)
* instead of doing an explicit pause/unpause.
*/
if ((ahc->type & AHC_AIC78X0) == 0)
pause_sequencer(ahc);
while ((scb = ahc->waiting_scbs.stqh_first) != NULL) {
@ -2589,7 +2588,8 @@ ahc_run_waiting_queue(ahc)
*/
ahc->curqincnt++;
}
unpause_sequencer(ahc, /*Unpause always*/FALSE);
if ((ahc->type & AHC_AIC78X0) == 0)
unpause_sequencer(ahc, /*Unpause always*/FALSE);
}
/*