diff options
author | gibbs <gibbs@FreeBSD.org> | 1996-06-09 17:33:18 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1996-06-09 17:33:18 +0000 |
commit | 7f880a4a3399287cffa3317a5f87c613f910c894 (patch) | |
tree | 12dbc9f886f063c3b554c48d6363d74badbb3848 /sys/i386 | |
parent | 8b9bc1f5a406e3d6b5f9a905a2ad0fa1053c91f3 (diff) | |
download | FreeBSD-src-7f880a4a3399287cffa3317a5f87c613f910c894.zip FreeBSD-src-7f880a4a3399287cffa3317a5f87c613f910c894.tar.gz |
Detect and report dataphase overruns. Put the adapter into 'Bit Bucket'
mode when this occurs and allow the target to complete the transaction.
Force a retry on overruns since they are usually caused by termination or
cable problems.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/scsi/aic7xxx.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c index a416a66..ead323b 100644 --- a/sys/i386/scsi/aic7xxx.c +++ b/sys/i386/scsi/aic7xxx.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.72 1996/05/31 06:32:09 gibbs Exp $ + * $Id: aic7xxx.c,v 1.73 1996/06/08 06:55:01 gibbs Exp $ */ /* * TODO: @@ -1649,6 +1649,31 @@ pagein_done: "unknown operation."); break; } + case DATA_OVERRUN: + { + /* + * When the sequencer detects an overrun, it + * sets STCNT to 0x00ffffff and allows the + * target to complete its transfer in + * BITBUCKET mode. + */ + u_char scbindex = AHC_INB(ahc, SCB_TAG); + u_int32_t overrun; + scb = ahc->scbarray[scbindex]; + overrun = AHC_INB(ahc, STCNT0) + | (AHC_INB(ahc, STCNT1) << 8) + | (AHC_INB(ahc, STCNT2) << 16); + overrun = 0x00ffffff - overrun; + sc_print_addr(scb->xs->sc_link); + printf("data overrun of %d bytes detected." + " Forcing a retry.\n", overrun); + /* + * Set this and it will take affect when the + * target does a command complete. + */ + scb->xs->error = XS_DRIVER_STUFFUP; + break; + } #if NOT_YET /* XXX Fill these in later */ case MESG_BUFFER_BUSY: |