summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/atapi.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1998-03-01 18:57:29 +0000
committersos <sos@FreeBSD.org>1998-03-01 18:57:29 +0000
commitf19ba03122045a49e7f5ef98f5dea688e12ecc44 (patch)
tree6ebb44149293c0909edfd38b9ac21e9ea9c029cd /sys/i386/isa/atapi.c
parentd3ce45cfa76014cd1c14da1310c58f097f3e3f2b (diff)
downloadFreeBSD-src-f19ba03122045a49e7f5ef98f5dea688e12ecc44.zip
FreeBSD-src-f19ba03122045a49e7f5ef98f5dea688e12ecc44.tar.gz
First pre alpha Work In Progress commit of a IDE/ATAPI tape driver.
It does endeed work, but there is still some problems to solve. I get a "nonrecovered data error" from time to time, but besides this it has backed up several Gigs allready. Please report any success/failure directly to me. Thanks to Warner Losh for providing a drive to use in writing this driver!
Diffstat (limited to 'sys/i386/isa/atapi.c')
-rw-r--r--sys/i386/isa/atapi.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c
index 588bb3d..f629aaf 100644
--- a/sys/i386/isa/atapi.c
+++ b/sys/i386/isa/atapi.c
@@ -105,7 +105,7 @@
#ifndef ATAPI_MODULE
# include "wcd.h"
# include "wfd.h"
-/* # include "wmt.h" -- add your driver here */
+# include "wst.h"
/* # include "wmd.h" -- add your driver here */
#endif
@@ -169,9 +169,12 @@ static int atapi_io (struct atapi *ata, struct atapicmd *ac);
static int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac);
static int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac);
+static void atapi_poll_dsc(struct atapi *ata);
+
extern int wdstart (int ctrlr);
-extern int wfdattach(struct atapi*, int, struct atapi_params*, int);
extern int wcdattach(struct atapi*, int, struct atapi_params*, int);
+extern int wfdattach(struct atapi*, int, struct atapi_params*, int);
+extern int wstattach(struct atapi*, int, struct atapi_params*, int);
/*
* Probe the ATAPI device at IDE controller `ctlr', drive `unit'.
@@ -295,11 +298,16 @@ int atapi_attach (int ctlr, int unit, int port)
break;
#endif
- case AT_TYPE_TAPE: /* streaming tape (QIC-121 model) */
-#if NWMT > 0
- /* Add your driver here */
+ case AT_TYPE_TAPE: /* streaming tape */
+#if NWST > 0
+ /* ATAPI Streaming Tape */
+ if (wstattach (ata, unit, ap, ata->debug) < 0)
+ break;
+ /* Device attached successfully. */
+ ata->attached[unit] = 1;
+ return (1);
#else
- printf ("wdc%d: ATAPI streaming tapes not supported yet\n", ctlr);
+ printf ("wdc%d: ATAPI streaming tapes not configured\n", ctlr);
#endif
break;
OpenPOWER on IntegriCloud