Disable SCSI interrupts while polling for the transfer to finish. This
fixes spurious panics while booting my Hades. This bug could also occur on a TT030.
This commit is contained in:
parent
8a20859c2e
commit
05ebc10205
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atari5380.c,v 1.28 1997/08/27 11:23:39 bouyer Exp $ */
|
||||
/* $NetBSD: atari5380.c,v 1.29 1998/10/06 09:29:44 leo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman.
|
||||
|
@ -375,11 +375,13 @@ tt_poll_edma(SC_REQ *reqp)
|
|||
* 'dma_ready' to check errors and perform the bookkeeping.
|
||||
*/
|
||||
|
||||
scsi_tt_idisable();
|
||||
for (;;) {
|
||||
delay(20);
|
||||
if (--timeout <= 0) {
|
||||
ncr_tprint(reqp, "timeout on polled transfer\n");
|
||||
reqp->xs->error = XS_TIMEOUT;
|
||||
scsi_tt_ienable();
|
||||
return(0);
|
||||
}
|
||||
dmstat = GET_TT_REG(NCR5380_DMSTAT);
|
||||
|
@ -397,6 +399,7 @@ tt_poll_edma(SC_REQ *reqp)
|
|||
if (dmastat & (SD_BUSERR|SD_ZERO))
|
||||
break;
|
||||
}
|
||||
scsi_tt_ienable();
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
@ -597,6 +600,12 @@ extern int *nofault;
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* OK. No bus error occurred above. Clear the nofault flag
|
||||
* so we no longer short-circuit bus errors.
|
||||
*/
|
||||
nofault = (int *) 0;
|
||||
|
||||
/*
|
||||
* Schedule an interrupt
|
||||
*/
|
||||
|
@ -608,12 +617,6 @@ extern int *nofault;
|
|||
*/
|
||||
SCSI_DMA->s_dma_ctrl &= ~SD_ENABLE;
|
||||
|
||||
/*
|
||||
* OK. No bus error occurred above. Clear the nofault flag
|
||||
* so we no longer short-circuit bus errors.
|
||||
*/
|
||||
nofault = (int *) 0;
|
||||
|
||||
/*
|
||||
* Update the DMA 'registers' to reflect that all bytes
|
||||
* have been transfered and tell this to the 5380 too.
|
||||
|
|
Loading…
Reference in New Issue