summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1999-01-03 17:26:04 +0000
committerkato <kato@FreeBSD.org>1999-01-03 17:26:04 +0000
commitf8af2f87d083d7e65c607a20dbd9c5a877840e99 (patch)
tree6770d52509348a9dbf14a6c595111527286bf21f /sys/pc98
parentea1bd971b492ea9b48b61920cb30a83763fd546d (diff)
downloadFreeBSD-src-f8af2f87d083d7e65c607a20dbd9c5a877840e99.zip
FreeBSD-src-f8af2f87d083d7e65c607a20dbd9c5a877840e99.tar.gz
Recognize IDE controler even if HDD is not connected.
Submitted by: IMAI Takeshi <take-i@ceres.dti.ne.jp>
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/pc98/wd.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c
index e4648d6..bcf6733 100644
--- a/sys/pc98/pc98/wd.c
+++ b/sys/pc98/pc98/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.67 1998/12/17 08:42:10 kato Exp $
+ * $Id: wd.c,v 1.68 1998/12/25 09:05:17 kato Exp $
*/
/* TODO:
@@ -381,9 +381,11 @@ wdprobe(struct isa_device *dvp)
}
}
du->dk_altport = du->dk_port + wd_ctlr;
+#if 0
if ((PC98_SYSTEM_PARAMETER(0x55d) & 3) == 0) {
goto nodevice;
}
+#endif
outb(0x432,(du->dk_unit)%2);
#else /* IBM-PC */
outb(du->dk_port + wd_sdh, WDSD_IBM); /* set unit 0 */
@@ -407,11 +409,31 @@ wdprobe(struct isa_device *dvp)
if (inb(du->dk_port + wd_cyl_lo) == 0x14 &&
inb(du->dk_port + wd_cyl_hi) == 0xeb)
goto reset_ok;
+#ifdef PC98
+ du->dk_unit = 2;
+#else
du->dk_unit = 1;
+#endif
outb(du->dk_port + wd_sdh, WDSD_IBM | 0x10); /* slave */
if (inb(du->dk_port + wd_cyl_lo) == 0x14 &&
inb(du->dk_port + wd_cyl_hi) == 0xeb)
goto reset_ok;
+#ifdef PC98
+ du->dk_unit = 1;
+ outb(0x432,(du->dk_unit)%2);
+ if (wdreset(du) == 0)
+ goto reset_ok;
+ /* test for ATAPI signature */
+ outb(du->dk_port + wd_sdh, WDSD_IBM); /* master */
+ if (inb(du->dk_port + wd_cyl_lo) == 0x14 &&
+ inb(du->dk_port + wd_cyl_hi) == 0xeb)
+ goto reset_ok;
+ du->dk_unit = 3;
+ outb(du->dk_port + wd_sdh, WDSD_IBM | 0x10); /* slave */
+ if (inb(du->dk_port + wd_cyl_lo) == 0x14 &&
+ inb(du->dk_port + wd_cyl_hi) == 0xeb)
+ goto reset_ok;
+#endif
#endif
DELAY(RECOVERYTIME);
if (wdreset(du) != 0) {
OpenPOWER on IntegriCloud