mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Pre 3.0 branch cleanup casualty #6: ft
This commit is contained in:
parent
2d1a2544dd
commit
fc47545ec3
14 changed files with 15 additions and 2957 deletions
|
|
@ -24,7 +24,7 @@
|
|||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: fdc.4,v 1.9 1997/10/19 13:12:35 joerg Exp $
|
||||
.\" $Id: fdc.4,v 1.10 1998/10/22 14:49:00 bde Exp $
|
||||
.\"
|
||||
.Dd August 31, 1994
|
||||
.Dt FDC 4 i386
|
||||
|
|
@ -37,9 +37,6 @@ PC architecture floppy disk controller driver
|
|||
.Cd "controller fdc0 at isa? port" \&"IO_FD1\&" "bio flags 0x1 irq 6 drq 2"
|
||||
.Cd "disk fd0 at fdc0 drive 0
|
||||
.Cd "disk fd1 at fdc0 drive 1
|
||||
.Pp
|
||||
For QIC40 and QIC80 tapedrives controlled by the floppy controller:
|
||||
.Cd "tape ft0 at fdc0 drive 2
|
||||
.Sh DESCRIPTION
|
||||
This driver provides access to floppy disk drives and QIC40/80 tapedrives.
|
||||
In /dev for each floppy device a number of minor devices are present. The
|
||||
|
|
@ -62,16 +59,11 @@ floppy disk device nodes
|
|||
.It /dev/fd*.<size in kB>
|
||||
floppy disk device nodes where the trailing number indicates the floppy
|
||||
capacity
|
||||
.It /dev/ft*
|
||||
floppy tape (QIC40/80) device nodes
|
||||
.It Pa /sys/i386/conf/GENERIC
|
||||
sample generic kernel config file
|
||||
.It Pa /sys/i386/isa/fd.c
|
||||
floppy driver source
|
||||
.It Pa /sys/i386/isa/ft.c
|
||||
floppy tape (QIC40/80 driver source
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr fdformat 1 ,
|
||||
.Xr disktab 5 ,
|
||||
.Xr ft 8
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: fdc.4,v 1.9 1997/10/19 13:12:35 joerg Exp $
|
||||
.\" $Id: fdc.4,v 1.10 1998/10/22 14:49:00 bde Exp $
|
||||
.\"
|
||||
.Dd August 31, 1994
|
||||
.Dt FDC 4 i386
|
||||
|
|
@ -37,9 +37,6 @@ PC architecture floppy disk controller driver
|
|||
.Cd "controller fdc0 at isa? port" \&"IO_FD1\&" "bio flags 0x1 irq 6 drq 2"
|
||||
.Cd "disk fd0 at fdc0 drive 0
|
||||
.Cd "disk fd1 at fdc0 drive 1
|
||||
.Pp
|
||||
For QIC40 and QIC80 tapedrives controlled by the floppy controller:
|
||||
.Cd "tape ft0 at fdc0 drive 2
|
||||
.Sh DESCRIPTION
|
||||
This driver provides access to floppy disk drives and QIC40/80 tapedrives.
|
||||
In /dev for each floppy device a number of minor devices are present. The
|
||||
|
|
@ -62,16 +59,11 @@ floppy disk device nodes
|
|||
.It /dev/fd*.<size in kB>
|
||||
floppy disk device nodes where the trailing number indicates the floppy
|
||||
capacity
|
||||
.It /dev/ft*
|
||||
floppy tape (QIC40/80) device nodes
|
||||
.It Pa /sys/i386/conf/GENERIC
|
||||
sample generic kernel config file
|
||||
.It Pa /sys/i386/isa/fd.c
|
||||
floppy driver source
|
||||
.It Pa /sys/i386/isa/ft.c
|
||||
floppy tape (QIC40/80 driver source
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr fdformat 1 ,
|
||||
.Xr disktab 5 ,
|
||||
.Xr ft 8
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# device lines is present in the ./LINT configuration file. If you are
|
||||
# in doubt as to the purpose or necessity of a line, check first in LINT.
|
||||
#
|
||||
# $Id: GENERIC,v 1.137 1998/12/27 13:06:40 phk Exp $
|
||||
# $Id: GENERIC,v 1.138 1998/12/27 13:12:59 phk Exp $
|
||||
|
||||
machine "i386"
|
||||
cpu "I386_CPU"
|
||||
|
|
@ -58,10 +58,6 @@ controller pci0
|
|||
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2
|
||||
disk fd0 at fdc0 drive 0
|
||||
disk fd1 at fdc0 drive 1
|
||||
# Unless you know very well what you're doing, leave ft0 at drive 2, or
|
||||
# remove the line entirely if you don't need it. Trying to configure
|
||||
# it on another unit might cause surprises, see PR kern/7176.
|
||||
tape ft0 at fdc0 drive 2
|
||||
|
||||
options "CMD640" # work around CMD640 chip deficiency
|
||||
controller wdc0 at isa? port "IO_WD1" bio irq 14
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.515 1998/12/27 12:52:45 phk Exp $
|
||||
# $Id: LINT,v 1.516 1998/12/27 13:06:40 phk Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
|
|
@ -1021,8 +1021,6 @@ options FDC_PRINT_BOGUS_CHIPTYPE
|
|||
|
||||
disk fd0 at fdc0 drive 0
|
||||
disk fd1 at fdc0 drive 1
|
||||
tape ft0 at fdc0 drive 2
|
||||
|
||||
|
||||
#
|
||||
# Other standard PC hardware: `lpt', `mse', `psm', `sio', etc.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.210 1998/12/27 12:52:46 phk Exp $
|
||||
# $Id: files.i386,v 1.211 1998/12/27 13:06:41 phk Exp $
|
||||
#
|
||||
# The long compile-with and dependency lines are required because of
|
||||
# limitations in config: backslash-newline doesn't work in strings, and
|
||||
|
|
@ -108,7 +108,6 @@ i386/isa/diskslice_machdep.c standard
|
|||
i386/isa/elink.c optional ep device-driver
|
||||
i386/isa/elink.c optional ie device-driver
|
||||
i386/isa/fd.c optional fd device-driver
|
||||
i386/isa/ft.c optional ft device-driver
|
||||
i386/isa/gpib.c optional gp device-driver
|
||||
i386/isa/asc.c optional asc device-driver
|
||||
i386/isa/gsc.c optional gsc device-driver
|
||||
|
|
|
|||
|
|
@ -47,14 +47,10 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.128 1998/12/12 08:16:01 imp Exp $
|
||||
* $Id: fd.c,v 1.129 1998/12/14 16:29:58 bde Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ft.h"
|
||||
#if NFT < 1
|
||||
#undef NFDC
|
||||
#endif
|
||||
#include "fd.h"
|
||||
#include "opt_devfs.h"
|
||||
#include "opt_fdc.h"
|
||||
|
|
@ -80,10 +76,6 @@
|
|||
#include <i386/isa/fdc.h>
|
||||
#include <i386/isa/rtc.h>
|
||||
#include <machine/stdarg.h>
|
||||
#if NFT > 0
|
||||
#include <sys/ftape.h>
|
||||
#include <i386/isa/ftreg.h>
|
||||
#endif
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif /* DEVFS */
|
||||
|
|
@ -198,17 +190,6 @@ static struct fd_data {
|
|||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
|
||||
#if NFT > 0
|
||||
int ftopen(dev_t, int);
|
||||
int ftintr(ftu_t ftu);
|
||||
int ftclose(dev_t, int);
|
||||
void ftstrategy(struct buf *);
|
||||
int ftioctl(dev_t, unsigned long, caddr_t, int, struct proc *);
|
||||
int ftdump(dev_t);
|
||||
int ftsize(dev_t);
|
||||
int ftattach(struct isa_device *, struct isa_device *, int);
|
||||
#endif
|
||||
|
||||
#ifdef FDC_YE
|
||||
#include "card.h"
|
||||
static int yeattach(struct isa_device *);
|
||||
|
|
@ -650,9 +631,6 @@ fdattach(struct isa_device *dev)
|
|||
fdc_p fdc = fdc_data + fdcu;
|
||||
fd_p fd;
|
||||
int fdsu, st0, st3, i;
|
||||
#if NFT > 0
|
||||
int unithasfd;
|
||||
#endif
|
||||
struct isa_device *fdup;
|
||||
int ic_type = 0;
|
||||
#ifdef DEVFS
|
||||
|
|
@ -679,7 +657,7 @@ fdattach(struct isa_device *dev)
|
|||
continue;
|
||||
fdu = fdup->id_unit;
|
||||
fd = &fd_data[fdu];
|
||||
if (fdu >= (NFD+NFT))
|
||||
if (fdu >= (NFD))
|
||||
continue;
|
||||
fdsu = fdup->id_physid;
|
||||
/* look up what bios thinks we have */
|
||||
|
|
@ -696,26 +674,8 @@ fdattach(struct isa_device *dev)
|
|||
}
|
||||
/* is there a unit? */
|
||||
if ((fdt == RTCFDT_NONE)
|
||||
#if NFT > 0
|
||||
|| (fdsu >= DRVS_PER_CTLR)) {
|
||||
#else
|
||||
) {
|
||||
fd->type = NO_TYPE;
|
||||
#endif
|
||||
#if NFT > 0
|
||||
/* If BIOS says no floppy, or > 2nd device */
|
||||
/* Probe for and attach a floppy tape. */
|
||||
/* Tell FT if there was already a disk */
|
||||
/* with this unit number found. */
|
||||
|
||||
unithasfd = 0;
|
||||
if (fdu < NFD && fd->type != NO_TYPE)
|
||||
unithasfd = 1;
|
||||
if (ftattach(dev, fdup, unithasfd))
|
||||
continue;
|
||||
if (fdsu < DRVS_PER_CTLR)
|
||||
fd->type = NO_TYPE;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1264,11 +1224,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
|
|||
int type = FDTYPE(minor(dev));
|
||||
fdc_p fdc;
|
||||
|
||||
#if NFT > 0
|
||||
/* check for a tape open */
|
||||
if (type & F_TAPE_TYPE)
|
||||
return(ftopen(dev, flags));
|
||||
#endif
|
||||
/* check bounds */
|
||||
if (fdu >= NFD)
|
||||
return(ENXIO);
|
||||
|
|
@ -1342,12 +1297,6 @@ fdclose(dev_t dev, int flags, int mode, struct proc *p)
|
|||
{
|
||||
fdu_t fdu = FDUNIT(minor(dev));
|
||||
|
||||
#if NFT > 0
|
||||
int type = FDTYPE(minor(dev));
|
||||
|
||||
if (type & F_TAPE_TYPE)
|
||||
return ftclose(dev, flags);
|
||||
#endif
|
||||
fd_data[fdu].flags &= ~FD_OPEN;
|
||||
fd_data[fdu].options &= ~FDOPT_NORETRY;
|
||||
|
||||
|
|
@ -1397,20 +1346,6 @@ fdstrategy(struct buf *bp)
|
|||
};
|
||||
#endif
|
||||
|
||||
#if NFT > 0
|
||||
if (FDTYPE(minor(bp->b_dev)) & F_TAPE_TYPE) {
|
||||
/* ft tapes do not (yet) support strategy i/o */
|
||||
bp->b_error = ENODEV;
|
||||
bp->b_flags |= B_ERROR;
|
||||
goto bad;
|
||||
}
|
||||
/* check for controller already busy with tape */
|
||||
if (fdc->flags & FDC_TAPE_BUSY) {
|
||||
bp->b_error = EBUSY;
|
||||
bp->b_flags |= B_ERROR;
|
||||
goto bad;
|
||||
}
|
||||
#endif
|
||||
fdblk = 128 << (fd->ft->secsize);
|
||||
if (!(bp->b_flags & B_FORMAT)) {
|
||||
if ((fdu >= NFD) || (bp->b_blkno < 0)) {
|
||||
|
|
@ -1544,13 +1479,6 @@ static void
|
|||
fdintr(fdcu_t fdcu)
|
||||
{
|
||||
fdc_p fdc = fdc_data + fdcu;
|
||||
#if NFT > 0
|
||||
fdu_t fdu = fdc->fdu;
|
||||
|
||||
if (fdc->flags & FDC_TAPE_BUSY)
|
||||
(ftintr(fdu));
|
||||
else
|
||||
#endif
|
||||
while(fdstate(fdcu, fdc))
|
||||
;
|
||||
}
|
||||
|
|
@ -2251,14 +2179,6 @@ fdioctl(dev, cmd, addr, flag, p)
|
|||
char buffer[DEV_BSIZE];
|
||||
int error = 0;
|
||||
|
||||
#if NFT > 0
|
||||
int type = FDTYPE(minor(dev));
|
||||
|
||||
/* check for a tape ioctl */
|
||||
if (type & F_TAPE_TYPE)
|
||||
return ftioctl(dev, cmd, addr, flag, p);
|
||||
#endif
|
||||
|
||||
fdblk = 128 << fd->ft->secsize;
|
||||
|
||||
switch (cmd)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# device lines is present in the ./LINT configuration file. If you are
|
||||
# in doubt as to the purpose or necessity of a line, check first in LINT.
|
||||
#
|
||||
# $Id: GENERIC,v 1.137 1998/12/27 13:06:40 phk Exp $
|
||||
# $Id: GENERIC,v 1.138 1998/12/27 13:12:59 phk Exp $
|
||||
|
||||
machine "i386"
|
||||
cpu "I386_CPU"
|
||||
|
|
@ -58,10 +58,6 @@ controller pci0
|
|||
controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2
|
||||
disk fd0 at fdc0 drive 0
|
||||
disk fd1 at fdc0 drive 1
|
||||
# Unless you know very well what you're doing, leave ft0 at drive 2, or
|
||||
# remove the line entirely if you don't need it. Trying to configure
|
||||
# it on another unit might cause surprises, see PR kern/7176.
|
||||
tape ft0 at fdc0 drive 2
|
||||
|
||||
options "CMD640" # work around CMD640 chip deficiency
|
||||
controller wdc0 at isa? port "IO_WD1" bio irq 14
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.515 1998/12/27 12:52:45 phk Exp $
|
||||
# $Id: LINT,v 1.516 1998/12/27 13:06:40 phk Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
|
|
@ -1021,8 +1021,6 @@ options FDC_PRINT_BOGUS_CHIPTYPE
|
|||
|
||||
disk fd0 at fdc0 drive 0
|
||||
disk fd1 at fdc0 drive 1
|
||||
tape ft0 at fdc0 drive 2
|
||||
|
||||
|
||||
#
|
||||
# Other standard PC hardware: `lpt', `mse', `psm', `sio', etc.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.515 1998/12/27 12:52:45 phk Exp $
|
||||
# $Id: LINT,v 1.516 1998/12/27 13:06:40 phk Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
|
|
@ -1021,8 +1021,6 @@ options FDC_PRINT_BOGUS_CHIPTYPE
|
|||
|
||||
disk fd0 at fdc0 drive 0
|
||||
disk fd1 at fdc0 drive 1
|
||||
tape ft0 at fdc0 drive 2
|
||||
|
||||
|
||||
#
|
||||
# Other standard PC hardware: `lpt', `mse', `psm', `sio', etc.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.210 1998/12/27 12:52:46 phk Exp $
|
||||
# $Id: files.i386,v 1.211 1998/12/27 13:06:41 phk Exp $
|
||||
#
|
||||
# The long compile-with and dependency lines are required because of
|
||||
# limitations in config: backslash-newline doesn't work in strings, and
|
||||
|
|
@ -108,7 +108,6 @@ i386/isa/diskslice_machdep.c standard
|
|||
i386/isa/elink.c optional ep device-driver
|
||||
i386/isa/elink.c optional ie device-driver
|
||||
i386/isa/fd.c optional fd device-driver
|
||||
i386/isa/ft.c optional ft device-driver
|
||||
i386/isa/gpib.c optional gp device-driver
|
||||
i386/isa/asc.c optional asc device-driver
|
||||
i386/isa/gsc.c optional gsc device-driver
|
||||
|
|
|
|||
|
|
@ -47,14 +47,10 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.128 1998/12/12 08:16:01 imp Exp $
|
||||
* $Id: fd.c,v 1.129 1998/12/14 16:29:58 bde Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ft.h"
|
||||
#if NFT < 1
|
||||
#undef NFDC
|
||||
#endif
|
||||
#include "fd.h"
|
||||
#include "opt_devfs.h"
|
||||
#include "opt_fdc.h"
|
||||
|
|
@ -80,10 +76,6 @@
|
|||
#include <i386/isa/fdc.h>
|
||||
#include <i386/isa/rtc.h>
|
||||
#include <machine/stdarg.h>
|
||||
#if NFT > 0
|
||||
#include <sys/ftape.h>
|
||||
#include <i386/isa/ftreg.h>
|
||||
#endif
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif /* DEVFS */
|
||||
|
|
@ -198,17 +190,6 @@ static struct fd_data {
|
|||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
|
||||
#if NFT > 0
|
||||
int ftopen(dev_t, int);
|
||||
int ftintr(ftu_t ftu);
|
||||
int ftclose(dev_t, int);
|
||||
void ftstrategy(struct buf *);
|
||||
int ftioctl(dev_t, unsigned long, caddr_t, int, struct proc *);
|
||||
int ftdump(dev_t);
|
||||
int ftsize(dev_t);
|
||||
int ftattach(struct isa_device *, struct isa_device *, int);
|
||||
#endif
|
||||
|
||||
#ifdef FDC_YE
|
||||
#include "card.h"
|
||||
static int yeattach(struct isa_device *);
|
||||
|
|
@ -650,9 +631,6 @@ fdattach(struct isa_device *dev)
|
|||
fdc_p fdc = fdc_data + fdcu;
|
||||
fd_p fd;
|
||||
int fdsu, st0, st3, i;
|
||||
#if NFT > 0
|
||||
int unithasfd;
|
||||
#endif
|
||||
struct isa_device *fdup;
|
||||
int ic_type = 0;
|
||||
#ifdef DEVFS
|
||||
|
|
@ -679,7 +657,7 @@ fdattach(struct isa_device *dev)
|
|||
continue;
|
||||
fdu = fdup->id_unit;
|
||||
fd = &fd_data[fdu];
|
||||
if (fdu >= (NFD+NFT))
|
||||
if (fdu >= (NFD))
|
||||
continue;
|
||||
fdsu = fdup->id_physid;
|
||||
/* look up what bios thinks we have */
|
||||
|
|
@ -696,26 +674,8 @@ fdattach(struct isa_device *dev)
|
|||
}
|
||||
/* is there a unit? */
|
||||
if ((fdt == RTCFDT_NONE)
|
||||
#if NFT > 0
|
||||
|| (fdsu >= DRVS_PER_CTLR)) {
|
||||
#else
|
||||
) {
|
||||
fd->type = NO_TYPE;
|
||||
#endif
|
||||
#if NFT > 0
|
||||
/* If BIOS says no floppy, or > 2nd device */
|
||||
/* Probe for and attach a floppy tape. */
|
||||
/* Tell FT if there was already a disk */
|
||||
/* with this unit number found. */
|
||||
|
||||
unithasfd = 0;
|
||||
if (fdu < NFD && fd->type != NO_TYPE)
|
||||
unithasfd = 1;
|
||||
if (ftattach(dev, fdup, unithasfd))
|
||||
continue;
|
||||
if (fdsu < DRVS_PER_CTLR)
|
||||
fd->type = NO_TYPE;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1264,11 +1224,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
|
|||
int type = FDTYPE(minor(dev));
|
||||
fdc_p fdc;
|
||||
|
||||
#if NFT > 0
|
||||
/* check for a tape open */
|
||||
if (type & F_TAPE_TYPE)
|
||||
return(ftopen(dev, flags));
|
||||
#endif
|
||||
/* check bounds */
|
||||
if (fdu >= NFD)
|
||||
return(ENXIO);
|
||||
|
|
@ -1342,12 +1297,6 @@ fdclose(dev_t dev, int flags, int mode, struct proc *p)
|
|||
{
|
||||
fdu_t fdu = FDUNIT(minor(dev));
|
||||
|
||||
#if NFT > 0
|
||||
int type = FDTYPE(minor(dev));
|
||||
|
||||
if (type & F_TAPE_TYPE)
|
||||
return ftclose(dev, flags);
|
||||
#endif
|
||||
fd_data[fdu].flags &= ~FD_OPEN;
|
||||
fd_data[fdu].options &= ~FDOPT_NORETRY;
|
||||
|
||||
|
|
@ -1397,20 +1346,6 @@ fdstrategy(struct buf *bp)
|
|||
};
|
||||
#endif
|
||||
|
||||
#if NFT > 0
|
||||
if (FDTYPE(minor(bp->b_dev)) & F_TAPE_TYPE) {
|
||||
/* ft tapes do not (yet) support strategy i/o */
|
||||
bp->b_error = ENODEV;
|
||||
bp->b_flags |= B_ERROR;
|
||||
goto bad;
|
||||
}
|
||||
/* check for controller already busy with tape */
|
||||
if (fdc->flags & FDC_TAPE_BUSY) {
|
||||
bp->b_error = EBUSY;
|
||||
bp->b_flags |= B_ERROR;
|
||||
goto bad;
|
||||
}
|
||||
#endif
|
||||
fdblk = 128 << (fd->ft->secsize);
|
||||
if (!(bp->b_flags & B_FORMAT)) {
|
||||
if ((fdu >= NFD) || (bp->b_blkno < 0)) {
|
||||
|
|
@ -1544,13 +1479,6 @@ static void
|
|||
fdintr(fdcu_t fdcu)
|
||||
{
|
||||
fdc_p fdc = fdc_data + fdcu;
|
||||
#if NFT > 0
|
||||
fdu_t fdu = fdc->fdu;
|
||||
|
||||
if (fdc->flags & FDC_TAPE_BUSY)
|
||||
(ftintr(fdu));
|
||||
else
|
||||
#endif
|
||||
while(fdstate(fdcu, fdc))
|
||||
;
|
||||
}
|
||||
|
|
@ -2251,14 +2179,6 @@ fdioctl(dev, cmd, addr, flag, p)
|
|||
char buffer[DEV_BSIZE];
|
||||
int error = 0;
|
||||
|
||||
#if NFT > 0
|
||||
int type = FDTYPE(minor(dev));
|
||||
|
||||
/* check for a tape ioctl */
|
||||
if (type & F_TAPE_TYPE)
|
||||
return ftioctl(dev, cmd, addr, flag, p);
|
||||
#endif
|
||||
|
||||
fdblk = 128 << fd->ft->secsize;
|
||||
|
||||
switch (cmd)
|
||||
|
|
|
|||
2580
sys/i386/isa/ft.c
2580
sys/i386/isa/ft.c
File diff suppressed because it is too large
Load diff
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 1993, 1994 Steve Gerakines
|
||||
*
|
||||
* This is freely redistributable software. You may do anything you
|
||||
* wish with it, so long as the above notice stays intact.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ftreg.h - QIC-40/80 floppy tape driver header
|
||||
* 06/03/94 v0.9
|
||||
* Changed seek load point to QC_SEEKLP, added reqseg to SegReq structure.
|
||||
*
|
||||
* 10/30/93 v0.3
|
||||
* More things will end up here. QC_VENDORID and QC_VERSION now used.
|
||||
*
|
||||
* 08/07/93 v0.2 release
|
||||
* Things that should've been here in the first place were moved.
|
||||
* Tape geometry and segment request types were added.
|
||||
*
|
||||
* 06/03/93 v0.1 Alpha release
|
||||
* Initial revision. Many more things should be moved here.
|
||||
*/
|
||||
|
||||
/* QIC-117 command set. */
|
||||
#define QC_RESET 1 /* reset */
|
||||
#define QC_NEXTBIT 2 /* report next bit */
|
||||
#define QC_PAUSE 3 /* pause */
|
||||
#define QC_STPAUSE 4 /* step pause */
|
||||
#define QC_TIMEOUT 5 /* alt timeout */
|
||||
#define QC_STATUS 6 /* report status */
|
||||
#define QC_ERRCODE 7 /* report error code */
|
||||
#define QC_CONFIG 8 /* report config */
|
||||
#define QC_VERSION 9 /* report version */
|
||||
#define QC_FORWARD 10 /* logical forward */
|
||||
#define QC_SEEKSTART 11 /* seek to track start */
|
||||
#define QC_SEEKEND 12 /* seek to track end */
|
||||
#define QC_SEEKTRACK 13 /* seek head to track */
|
||||
#define QC_SEEKLP 14 /* seek load point */
|
||||
#define QC_FORMAT 15 /* format mode */
|
||||
#define QC_WRITEREF 16 /* write reference */
|
||||
#define QC_VERIFY 17 /* verify mode */
|
||||
#define QC_STOP 18 /* stop tape */
|
||||
#define QC_STEPUP 21 /* step head up */
|
||||
#define QC_STEPDOWN 22 /* step head down */
|
||||
#define QC_SEEKREV 25 /* seek reverse */
|
||||
#define QC_SEEKFWD 26 /* seek forward */
|
||||
#define QC_RATE 27 /* select data rate */
|
||||
#define QC_DIAG1 28 /* diagnostic mode 1 */
|
||||
#define QC_DIAG2 29 /* diagnostic mode 2 */
|
||||
#define QC_PRIMARY 30 /* primary mode */
|
||||
#define QC_VENDORID 32 /* vendor id */
|
||||
#define QC_TSTATUS 33 /* report tape status */
|
||||
#define QC_EXTREV 34 /* extended skip reverse */
|
||||
#define QC_EXTFWD 35 /* extended skip forward */
|
||||
|
||||
/* Colorado enable/disable. */
|
||||
#define QC_COL_ENABLE1 46 /* enable */
|
||||
#define QC_COL_ENABLE2 2 /* unit+2 */
|
||||
#define QC_COL_DISABLE 47 /* disable */
|
||||
|
||||
/* Mountain enable/disable. */
|
||||
#define QC_MTN_ENABLE1 23 /* enable 1 */
|
||||
#define QC_MTN_ENABLE2 20 /* enable 2 */
|
||||
#define QC_MTN_DISABLE 24 /* disable */
|
||||
|
||||
/* Segment I/O request. */
|
||||
typedef struct segq {
|
||||
unsigned char buff[QCV_SEGSIZE];/* Segment data; first for alignment */
|
||||
int reqtype; /* Request type */
|
||||
long reqcrc; /* CRC Errors found */
|
||||
long reqbad; /* Bad sector map */
|
||||
long reqblk; /* Block request starts at */
|
||||
long reqseg; /* Segment request is at */
|
||||
int reqcan; /* Cancel read-ahead */
|
||||
struct segq *next; /* Next request */
|
||||
} SegReq;
|
||||
|
||||
typedef int ftu_t;
|
||||
typedef int ftsu_t;
|
||||
typedef struct ft_data *ft_p;
|
||||
84
sys/isa/fd.c
84
sys/isa/fd.c
|
|
@ -47,14 +47,10 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.128 1998/12/12 08:16:01 imp Exp $
|
||||
* $Id: fd.c,v 1.129 1998/12/14 16:29:58 bde Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ft.h"
|
||||
#if NFT < 1
|
||||
#undef NFDC
|
||||
#endif
|
||||
#include "fd.h"
|
||||
#include "opt_devfs.h"
|
||||
#include "opt_fdc.h"
|
||||
|
|
@ -80,10 +76,6 @@
|
|||
#include <i386/isa/fdc.h>
|
||||
#include <i386/isa/rtc.h>
|
||||
#include <machine/stdarg.h>
|
||||
#if NFT > 0
|
||||
#include <sys/ftape.h>
|
||||
#include <i386/isa/ftreg.h>
|
||||
#endif
|
||||
#ifdef DEVFS
|
||||
#include <sys/devfsext.h>
|
||||
#endif /* DEVFS */
|
||||
|
|
@ -198,17 +190,6 @@ static struct fd_data {
|
|||
* fdsu is the floppy drive unit number on that controller. (sub-unit) *
|
||||
\***********************************************************************/
|
||||
|
||||
#if NFT > 0
|
||||
int ftopen(dev_t, int);
|
||||
int ftintr(ftu_t ftu);
|
||||
int ftclose(dev_t, int);
|
||||
void ftstrategy(struct buf *);
|
||||
int ftioctl(dev_t, unsigned long, caddr_t, int, struct proc *);
|
||||
int ftdump(dev_t);
|
||||
int ftsize(dev_t);
|
||||
int ftattach(struct isa_device *, struct isa_device *, int);
|
||||
#endif
|
||||
|
||||
#ifdef FDC_YE
|
||||
#include "card.h"
|
||||
static int yeattach(struct isa_device *);
|
||||
|
|
@ -650,9 +631,6 @@ fdattach(struct isa_device *dev)
|
|||
fdc_p fdc = fdc_data + fdcu;
|
||||
fd_p fd;
|
||||
int fdsu, st0, st3, i;
|
||||
#if NFT > 0
|
||||
int unithasfd;
|
||||
#endif
|
||||
struct isa_device *fdup;
|
||||
int ic_type = 0;
|
||||
#ifdef DEVFS
|
||||
|
|
@ -679,7 +657,7 @@ fdattach(struct isa_device *dev)
|
|||
continue;
|
||||
fdu = fdup->id_unit;
|
||||
fd = &fd_data[fdu];
|
||||
if (fdu >= (NFD+NFT))
|
||||
if (fdu >= (NFD))
|
||||
continue;
|
||||
fdsu = fdup->id_physid;
|
||||
/* look up what bios thinks we have */
|
||||
|
|
@ -696,26 +674,8 @@ fdattach(struct isa_device *dev)
|
|||
}
|
||||
/* is there a unit? */
|
||||
if ((fdt == RTCFDT_NONE)
|
||||
#if NFT > 0
|
||||
|| (fdsu >= DRVS_PER_CTLR)) {
|
||||
#else
|
||||
) {
|
||||
fd->type = NO_TYPE;
|
||||
#endif
|
||||
#if NFT > 0
|
||||
/* If BIOS says no floppy, or > 2nd device */
|
||||
/* Probe for and attach a floppy tape. */
|
||||
/* Tell FT if there was already a disk */
|
||||
/* with this unit number found. */
|
||||
|
||||
unithasfd = 0;
|
||||
if (fdu < NFD && fd->type != NO_TYPE)
|
||||
unithasfd = 1;
|
||||
if (ftattach(dev, fdup, unithasfd))
|
||||
continue;
|
||||
if (fdsu < DRVS_PER_CTLR)
|
||||
fd->type = NO_TYPE;
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1264,11 +1224,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
|
|||
int type = FDTYPE(minor(dev));
|
||||
fdc_p fdc;
|
||||
|
||||
#if NFT > 0
|
||||
/* check for a tape open */
|
||||
if (type & F_TAPE_TYPE)
|
||||
return(ftopen(dev, flags));
|
||||
#endif
|
||||
/* check bounds */
|
||||
if (fdu >= NFD)
|
||||
return(ENXIO);
|
||||
|
|
@ -1342,12 +1297,6 @@ fdclose(dev_t dev, int flags, int mode, struct proc *p)
|
|||
{
|
||||
fdu_t fdu = FDUNIT(minor(dev));
|
||||
|
||||
#if NFT > 0
|
||||
int type = FDTYPE(minor(dev));
|
||||
|
||||
if (type & F_TAPE_TYPE)
|
||||
return ftclose(dev, flags);
|
||||
#endif
|
||||
fd_data[fdu].flags &= ~FD_OPEN;
|
||||
fd_data[fdu].options &= ~FDOPT_NORETRY;
|
||||
|
||||
|
|
@ -1397,20 +1346,6 @@ fdstrategy(struct buf *bp)
|
|||
};
|
||||
#endif
|
||||
|
||||
#if NFT > 0
|
||||
if (FDTYPE(minor(bp->b_dev)) & F_TAPE_TYPE) {
|
||||
/* ft tapes do not (yet) support strategy i/o */
|
||||
bp->b_error = ENODEV;
|
||||
bp->b_flags |= B_ERROR;
|
||||
goto bad;
|
||||
}
|
||||
/* check for controller already busy with tape */
|
||||
if (fdc->flags & FDC_TAPE_BUSY) {
|
||||
bp->b_error = EBUSY;
|
||||
bp->b_flags |= B_ERROR;
|
||||
goto bad;
|
||||
}
|
||||
#endif
|
||||
fdblk = 128 << (fd->ft->secsize);
|
||||
if (!(bp->b_flags & B_FORMAT)) {
|
||||
if ((fdu >= NFD) || (bp->b_blkno < 0)) {
|
||||
|
|
@ -1544,13 +1479,6 @@ static void
|
|||
fdintr(fdcu_t fdcu)
|
||||
{
|
||||
fdc_p fdc = fdc_data + fdcu;
|
||||
#if NFT > 0
|
||||
fdu_t fdu = fdc->fdu;
|
||||
|
||||
if (fdc->flags & FDC_TAPE_BUSY)
|
||||
(ftintr(fdu));
|
||||
else
|
||||
#endif
|
||||
while(fdstate(fdcu, fdc))
|
||||
;
|
||||
}
|
||||
|
|
@ -2251,14 +2179,6 @@ fdioctl(dev, cmd, addr, flag, p)
|
|||
char buffer[DEV_BSIZE];
|
||||
int error = 0;
|
||||
|
||||
#if NFT > 0
|
||||
int type = FDTYPE(minor(dev));
|
||||
|
||||
/* check for a tape ioctl */
|
||||
if (type & F_TAPE_TYPE)
|
||||
return ftioctl(dev, cmd, addr, flag, p);
|
||||
#endif
|
||||
|
||||
fdblk = 128 << fd->ft->secsize;
|
||||
|
||||
switch (cmd)
|
||||
|
|
|
|||
Loading…
Reference in a new issue