aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin T. Gibbs <gibbs@FreeBSD.org>1997-08-21 21:23:21 +0000
committerJustin T. Gibbs <gibbs@FreeBSD.org>1997-08-21 21:23:21 +0000
commitb13364fea84f647cbdf2579e7ff8c7fedb217ce0 (patch)
treea12f6d5962f258017860e87e29fe7c06979d8fd2
parentb1037dcd53d5a0d9f735002dfe48153f9678742b (diff)
downloadsrc-b13364fea84f647cbdf2579e7ff8c7fedb217ce0.tar.gz
src-b13364fea84f647cbdf2579e7ff8c7fedb217ce0.zip
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>
Notes
Notes: svn path=/head/; revision=28552
-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 1146e36b57b7..fe02f3185783 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;
}