diff options
| author | Justin T. Gibbs <gibbs@FreeBSD.org> | 1997-04-04 04:09:29 +0000 |
|---|---|---|
| committer | Justin T. Gibbs <gibbs@FreeBSD.org> | 1997-04-04 04:09:29 +0000 |
| commit | 5ea0ae111d43b0cf29a444cadd52d8eabac8738f (patch) | |
| tree | 31ef8007bb69c28222c65a6c1c33eb33d4c77bf0 | |
| parent | 1e97ca011629d7812406033ec4e42f6d263d18c4 (diff) | |
Notes
| -rw-r--r-- | sys/dev/aic7xxx/aic7xxx.seq | 31 | ||||
| -rw-r--r-- | sys/i386/scsi/aic7xxx.c | 21 |
2 files changed, 24 insertions, 28 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 572586588dd9..ddfe35fe7be3 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -757,8 +757,15 @@ mesgin_identify: or SAVED_TCL,A; /* SAVED_TCL should be complete now */ mov SAVED_TCL call index_untagged_scb; mov ARG_1, SINDIR; - /* XXX Directly index in the non paging case */ +.if ( SCB_PAGING ) cmp ARG_1,SCB_LIST_NULL jne use_findSCB; +.else + cmp ARG_1,SCB_LIST_NULL je snoop_tag; + /* Directly index the SCB */ + mov SCBPTR,ARG_1; + test SCB_CONTROL,DISCONNECTED jz not_found; + jmp setup_SCB; +.endif /* * Here we "snoop" the bus looking for a SIMPLE QUEUE TAG message. * If we get one, we use the tag returned to find the proper @@ -767,6 +774,7 @@ mesgin_identify: * If we're not using SCB paging, we can use the tag as the direct * index to the SCB. */ +snoop_tag: mov NONE,SCSIDATL; /* ACK Identify MSG */ snoop_tag_loop: test SSTAT1,REQINIT jz snoop_tag_loop; @@ -786,8 +794,13 @@ get_tag: jc not_found; .if ! ( SCB_PAGING ) - jmp index_by_tag; -.endif +index_by_tag: + mov SCBPTR,ARG_1; + mov A, SAVED_TCL; + cmp SCB_TCL,A jne not_found; + test SCB_CONTROL,TAG_ENB jz not_found; + test SCB_CONTROL,DISCONNECTED jz not_found; +.else /* * Ensure that the SCB the tag points to is for an SCB transaction * to the reconnecting target. @@ -795,17 +808,11 @@ get_tag: use_findSCB: mov ALLZEROS call findSCB; /* Have to search */ cmp SINDEX, SCB_LIST_NULL je not_found; +.endif setup_SCB: and SCB_CONTROL,~DISCONNECTED; or SEQ_FLAGS,IDENTIFY_SEEN; /* make note of IDENTIFY */ jmp mesgin_done; -index_by_tag: - mov SCBPTR,ARG_1; - mov A, SAVED_TCL; - cmp SCB_TCL,A jne not_found; - test SCB_CONTROL,TAG_ENB jz not_found; - test SCB_CONTROL,DISCONNECTED jz not_found; - jmp setup_SCB; not_found: mvi INTSTAT, NO_MATCH; @@ -952,6 +959,7 @@ assert: mvi INTSTAT,NO_IDENT ret; /* no - tell the kernel */ +.if ( SCB_PAGING ) /* * Locate a disconnected SCB either by SAVED_TCL (ARG_1 is SCB_LIST_NULL) * or by the SCBIDn ARG_1. The search begins at the SCB index passed in @@ -972,17 +980,14 @@ findSCB_loop: * one we want. If we aren't paging or the SCB we dma down has the * abort flag set, return not found. */ -.if ( SCB_PAGING ) mov ALLZEROS call get_free_or_disc_scb; mvi DMAPARAMS, HDMAEN|DIRECTION|FIFORESET; mov ARG_1 call dma_scb; test SCB_CONTROL, ABORT_SCB jz return; -.endif find_error: mvi SINDEX, SCB_LIST_NULL ret; foundSCB: test SCB_CONTROL, ABORT_SCB jnz find_error; -.if ( SCB_PAGING ) rem_scb_from_disc_list: /* Remove this SCB from the disconnection list */ cmp SCB_NEXT,SCB_LIST_NULL je unlink_prev; diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c index d89727df229a..85a1300331b2 100644 --- a/sys/i386/scsi/aic7xxx.c +++ b/sys/i386/scsi/aic7xxx.c @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.108 1997/03/24 05:05:18 gibbs Exp $ + * $Id: aic7xxx.c,v 1.109 1997/03/24 17:42:25 gibbs Exp $ */ /* * TODO: @@ -1647,12 +1647,13 @@ ahc_handle_scsiint(ahc, intstat) next_scb, links); next_scb->flags |= SCB_WAITINGQ; } - scb->xs->error = XS_DRIVER_STUFFUP; + scb->xs->error = XS_TIMEOUT; sc_print_addr(scb->xs->sc_link); ahc_done(ahc, scb); scb = NULL; - } else + } else { printf("%s: ", ahc_name(ahc)); + } printf("Unexpected busfree. LASTPHASE == 0x%x\n" "SEQADDR == 0x%x\n", lastphase, (ahc_inb(ahc, SEQADDR1) << 8) @@ -2935,17 +2936,7 @@ ahc_timeout(arg) * Some other SCB has started a recovery operation * and is still working on cleaning things up. */ - if (scb->flags & SCB_TIMEDOUT) { - /* - * This SCB has been here before and is not the - * recovery SCB. Cut our losses and panic. Its - * better to do this than trash a filesystem. - */ - sc_print_addr(scb->xs->sc_link); - panic("%s: Timed-out command times out " - "again. SCB = 0x%x\n", ahc_name(ahc), - scb->hscb->tag); - } else if ((scb->flags & SCB_RECOVERY_SCB) == 0) { + if ((scb->flags & SCB_RECOVERY_SCB) == 0) { /* * This is not the SCB that started this timeout * processing. Give this scb another lifetime so @@ -3039,7 +3030,7 @@ bus_reset: SELBUSB : 0))); scb->flags |= SCB_SENTORDEREDTAG|SCB_RECOVERY_SCB; ahc->orderedtag |= mask; - timeout(ahc_timeout, (caddr_t)scb, (1 * hz)); + timeout(ahc_timeout, (caddr_t)scb, (5 * hz)); unpause_sequencer(ahc, /*unpause_always*/TRUE); printf("Ordered Tag queued\n"); } else { |
