diff options
author | nyan <nyan@FreeBSD.org> | 2002-02-11 05:46:25 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-02-11 05:46:25 +0000 |
commit | 79addeb60498bbc1f833ed96790308deabf30280 (patch) | |
tree | f2bfeabb7c08a5929bfa838e36c0e338c9e5ed9d /sys/pc98 | |
parent | 19dc331de5d00ebce7bfa3fda1479950c9c984cb (diff) | |
download | FreeBSD-src-79addeb60498bbc1f833ed96790308deabf30280.zip FreeBSD-src-79addeb60498bbc1f833ed96790308deabf30280.tar.gz |
Fall through from AT_TYPE_DIRECT to AT_TYPE_CDROM.
Old ATAPI CD-ROM drives return 0 (direct-access) as the type of the device.
(The ata driver has the same problem.)
MFC after: 3 days
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/pc98/atapi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/pc98/pc98/atapi.c b/sys/pc98/pc98/atapi.c index 84f3ee2..ab1f7fd 100644 --- a/sys/pc98/pc98/atapi.c +++ b/sys/pc98/pc98/atapi.c @@ -253,11 +253,14 @@ int atapi_attach (int ctlr, int unit, int port) case AT_TYPE_DIRECT: /* direct-access */ #if NWFD > 0 /* ATAPI Floppy(LS-120) */ - if (wfdattach (ata, unit, ap, ata->debug) < 0) - break; + if (wfdattach (ata, unit, ap, ata->debug) >= 0) { /* Device attached successfully. */ - ata->attached[unit] = 1; - return (1); + ata->attached[unit] = 1; + return (1); + } +#endif +#if NWCD > 0 + /* FALLTHROUGH */ #else printf ("wdc%d: ATAPI Floppies not configured\n", ctlr); break; |