Instead of testing for both SELDI and SELDO in SSTAT0 in the poll for work

loop, test for them separately.  The bug report from David Malone showed that
even though we had been reselected (SELDI was true), we sat in the poll for
work loop until the selection timeout timer expired.  It may be that the
SSTAT0 register doesn't like to have more than one bit tested at a time.
I've seen stranger things than this on these parts.
This commit is contained in:
Justin T. Gibbs 1997-04-05 22:03:47 +00:00
parent 844b7c2d86
commit 1961f6e884

View File

@ -37,7 +37,7 @@
*OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
*SUCH DAMAGE.
*
* $Id$
* $Id: aic7xxx.seq,v 1.68 1997/04/04 19:35:30 gibbs Exp $
*
*-M************************************************************************/
@ -72,7 +72,8 @@ reset:
mvi SCSISEQ, ENRSELI|ENAUTOATNP;
call clear_target_state;
poll_for_work:
test SSTAT0,SELDI|SELDO jnz selection;
test SSTAT0,SELDO jnz select;
test SSTAT0,SELDI jnz reselect;
test SCSISEQ, ENSELO jnz poll_for_work;
.if ( TWIN_CHANNEL )
/*
@ -82,7 +83,8 @@ poll_for_work:
* either a selection or reselection occurs.
*/
xor SBLKCTL,SELBUSB; /* Toggle to the other bus */
test SSTAT0,SELDI|SELDO jnz selection;
test SSTAT0,SELDO jnz select;
test SSTAT0,SELDI jnz reselect;
test SCSISEQ, ENSELO jnz poll_for_work;
xor SBLKCTL,SELBUSB; /* Toggle back */
.endif
@ -203,8 +205,6 @@ initialize_scsiid:
* Reselection has been initiated by a target. Make a note that we've been
* reselected, but haven't seen an IDENTIFY message from the target yet.
*/
selection:
test SSTAT0, SELDI jz select;
reselect:
clr MSG_LEN; /* Don't have anything in the mesg buffer */
mvi CLRSINT0, CLRSELDI;