diff options
author | nate <nate@FreeBSD.org> | 1994-02-14 22:24:28 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1994-02-14 22:24:28 +0000 |
commit | eed2243f2ed6c6e6a00f24c3b36c951ecedfb43c (patch) | |
tree | 46c43479797d1a3405a620b051fc0773d11f192c /sys/i386/isa/ft.c | |
parent | 2d7ae2a7d55ae4b4f4e00ecf85bc1eab52f78625 (diff) | |
download | FreeBSD-src-eed2243f2ed6c6e6a00f24c3b36c951ecedfb43c.zip FreeBSD-src-eed2243f2ed6c6e6a00f24c3b36c951ecedfb43c.tar.gz |
From: Jim Babb <babb@sedhps01.mdc.com>
Date: Mon, 14 Feb 94 15:57:14 CST
This adds a copyright to the fdc.h file and fixes a bug in re-tries
during writes on a heavily loaded system.
Diffstat (limited to 'sys/i386/isa/ft.c')
-rw-r--r-- | sys/i386/isa/ft.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/i386/isa/ft.c b/sys/i386/isa/ft.c index 326b5bee..b85e14d 100644 --- a/sys/i386/isa/ft.c +++ b/sys/i386/isa/ft.c @@ -17,6 +17,8 @@ * POSSIBILITY OF SUCH DAMAGE. * * ft.c - QIC-40/80 floppy tape driver + * $Id:$ + * * * 01/26/94 v0.3b - Jim Babb * Got rid of the hard coded device selection. Moved (some of) the @@ -910,7 +912,7 @@ restate: #endif /* Check for errors */ - if ((rddta[0] & 0xc0) == 0x40) { + if ((rddta[0] & 0xc0) != 0x00) { if (rddta[1] & 0x04) { /* Probably wrong position */ ft->lastpos = ft->xblk; @@ -1020,16 +1022,16 @@ restate: #endif /* Check for errors */ - if ((rddta[0] & 0xc0) == 0x40) { + if ((rddta[0] & 0xc0) != 0x00) { if (rddta[1] & 0x04) { /* Probably wrong position */ ft->lastpos = ft->xblk; - ard_state = 0; + awr_state = 0; goto restate; } else if (retries < 5) { /* Something happened -- try again */ ft->lastpos = ft->xblk; - ard_state = 0; + awr_state = 0; retries++; goto restate; } else { @@ -1695,8 +1697,12 @@ int qic_status(ftu_t ftu, int cmd, int nbits) int ftopen(dev_t dev, int arg2) { ftu_t ftu = FDUNIT(minor(dev)); int type = FDTYPE(minor(dev)); - fdc_p fdc = ft_data[ftu].fdc; + fdc_p fdc; + /* check bounds */ + if (ftu >= NFT) + return(ENXIO); + fdc = ft_data[ftu].fdc; /* check for controller already busy with tape */ if (fdc->flags & FDC_TAPE_BUSY) return(EBUSY); |