1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00

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>
This commit is contained in:
Justin T. Gibbs 1997-08-21 21:23:21 +00:00
parent b1037dcd53
commit b13364fea8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=28552

View File

@ -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 @@ ahc_timeout(arg)
(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 @@ ahc_timeout(arg)
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;
}