diff options
author | pst <pst@FreeBSD.org> | 1998-01-16 22:13:07 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1998-01-16 22:13:07 +0000 |
commit | 5b2d50825dde772d9ab907bf3fd560a27a6456da (patch) | |
tree | 35836f4b404a4c098795833ed45137fd4c68c7b8 /sys/i386/isa/atapi.c | |
parent | ebfc352c099b88891f728b030dd325321646472a (diff) | |
download | FreeBSD-src-5b2d50825dde772d9ab907bf3fd560a27a6456da.zip FreeBSD-src-5b2d50825dde772d9ab907bf3fd560a27a6456da.tar.gz |
Bring in IDE ATAPI floppy support.
This is Junichi's v1.0 driver.
NOTE: Major device numbers have been changed to avoid conflict with other
FreeBSD 3.0 devices. The new numbers should be considered "official."
This driver is still considered "beta" quality, although we have been
playing with it. Please submit bugs to junichi and myself.
Submitted by: junichi@astec.co.jp
Diffstat (limited to 'sys/i386/isa/atapi.c')
-rw-r--r-- | sys/i386/isa/atapi.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c index 2a7025f..56fbbfb 100644 --- a/sys/i386/isa/atapi.c +++ b/sys/i386/isa/atapi.c @@ -104,6 +104,7 @@ #ifndef ATAPI_MODULE # include "wcd.h" +# include "wfd.h" /* # include "wmt.h" -- add your driver here */ /* # include "wmd.h" -- add your driver here */ #endif @@ -169,6 +170,7 @@ static int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac); static int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac); 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); /* @@ -217,6 +219,8 @@ int atapi_attach (int ctlr, int unit, int port) case AT_DRQT_ACCEL: printf (", accel"); break; default: printf (", drq%d", ap->drqtype); } + if (ata->slow) + ata->intrcmd = 0; /* overlap operation supported */ if (ap->ovlapflag) @@ -270,6 +274,14 @@ int atapi_attach (int ctlr, int unit, int port) break; case AT_TYPE_DIRECT: /* direct-access */ +#if NWFD > 0 + /* ATAPI Floppy(LS-120) */ + if (wfdattach (ata, unit, ap, ata->debug) >= 0) { + /* Device attached successfully. */ + ata->attached[unit] = 1; + return (1); + } +#endif case AT_TYPE_CDROM: /* CD-ROM device */ #if NWCD > 0 /* ATAPI CD-ROM */ @@ -316,6 +328,7 @@ static char *cmdname (u_char cmd) case 0x1e: return ("PREVENT_ALLOW"); case 0x25: return ("READ_CAPACITY"); case 0x28: return ("READ_BIG"); + case 0x2a: return ("WRITE_BIG"); case 0x43: return ("READ_TOC"); case 0x42: return ("READ_SUBCHANNEL"); case 0x55: return ("MODE_SELECT_BIG"); @@ -479,7 +492,7 @@ static struct atapicmd *atapi_alloc (struct atapi *ata) struct atapicmd *ac; while (! ata->free) - tsleep ((caddr_t)ata, PRIBIO, "atacmd", 0); + tsleep ((caddr_t)ata, PRIBIO, "atacmd", 100); ac = ata->free; ata->free = ac->next; ac->busy = 1; |