summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1997-08-21 21:23:21 +0000
committergibbs <gibbs@FreeBSD.org>1997-08-21 21:23:21 +0000
commit364b0631703e7544257353a3980143d13dbc7d9e (patch)
tree68b8d7913dfd77bd06133f39cfc9455468cc107d
parent6be005551ffd1ace2f7ba1934a910737f2e59575 (diff)
downloadFreeBSD-src-364b0631703e7544257353a3980143d13dbc7d9e.zip
FreeBSD-src-364b0631703e7544257353a3980143d13dbc7d9e.tar.gz
Change restart_sequencer to be more robust by performing an explicit
pause before attempting to reset the sequencer address. Remove the loop checking to see if the address has gone to zero since it is unnecessary Adjust the abort SCB timeouts back up to 2 seconds where they should be. Fix an oversight in the removal of the bus reset settle code where we might not run the queue of completed commands. Remove an unecessary call to ahc_run_done_queue in ahc_reset_current_bus. Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
-rw-r--r--sys/i386/scsi/aic7xxx.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c
index 1146e36..fe02f31 100644
--- a/sys/i386/scsi/aic7xxx.c
+++ b/sys/i386/scsi/aic7xxx.c
@@ -39,7 +39,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.c,v 1.122 1997/08/15 19:27:37 gibbs Exp $
+ * $Id: aic7xxx.c,v 1.123 1997/08/17 14:04:08 itojun Exp $
*/
/*
* TODO:
@@ -241,11 +241,8 @@ static inline void
restart_sequencer(ahc)
struct ahc_softc *ahc;
{
- do {
- ahc_outb(ahc, SEQCTL, SEQRESET|FASTMODE);
- } while ((ahc_inb(ahc, SEQADDR0) != 0)
- || (ahc_inb(ahc, SEQADDR1) != 0));
-
+ pause_sequencer(ahc);
+ ahc_outb(ahc, SEQCTL, SEQRESET|FASTMODE);
unpause_sequencer(ahc, /*unpause_always*/TRUE);
}
@@ -3067,7 +3064,7 @@ bus_reset:
(scb->xs->timeout * hz) / 1000);
}
timeout(ahc_timeout, (caddr_t)active_scb,
- (200 * hz) / 1000);
+ (2000 * hz) / 1000);
unpause_sequencer(ahc, /*unpause_always*/TRUE);
} else {
int disconnected;
@@ -3133,7 +3130,7 @@ bus_reset:
links);
scb->flags |= SCB_WAITINGQ;
timeout(ahc_timeout, (caddr_t)scb,
- (200 * hz) / 1000);
+ (2000 * hz) / 1000);
ahc_outb(ahc, SCBPTR, saved_scbptr);
/*
* ahc_run_waiting_queue may unpause us
@@ -3636,8 +3633,6 @@ ahc_reset_current_bus(ahc)
/* Re-enable reset interrupts */
ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) | ENSCSIRST);
-
- ahc_run_done_queue(ahc);
}
static int
@@ -3726,13 +3721,7 @@ ahc_reset_channel(ahc, channel, xs_error, initiate_reset)
* processing.
*/
ahc_untimeout_done_queue(ahc);
- if (initiate_reset == 0) {
- /*
- * If we initiated the reset, we'll run the queue
- * once our bus-settle delay has expired.
- */
- ahc_run_done_queue(ahc);
- }
+ ahc_run_done_queue(ahc);
return found;
}
OpenPOWER on IntegriCloud