diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-07 19:15:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-07 19:15:32 +0000 |
commit | fe7fe3e273fcbc0b285bf879d4083338a8097d72 (patch) | |
tree | 87b38b2ce138cdc33ba98136c757a8244970c59a /sys/dev/isa/wdc.c | |
parent | 25dd8de18a1b1203722bc4ebe34cfe8803e9f89f (diff) |
put wd_error check back; without this machine boot times go well over 60 seconds
Diffstat (limited to 'sys/dev/isa/wdc.c')
-rw-r--r-- | sys/dev/isa/wdc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/isa/wdc.c b/sys/dev/isa/wdc.c index 0e359a17baa..b47f31860e6 100644 --- a/sys/dev/isa/wdc.c +++ b/sys/dev/isa/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.29 1998/07/05 07:20:02 downsj Exp $ */ +/* $OpenBSD: wdc.c,v 1.30 1998/07/07 19:15:31 deraadt Exp $ */ /* $NetBSD: wd.c,v 1.150 1996/05/12 23:54:03 mycroft Exp $ */ /* @@ -183,15 +183,21 @@ wdcprobe(parent, match, aux) wdc->sc_ioh = ioh; /* Check if we have registers that work. */ + /* Error register not writable, */ + bus_space_write_1(iot, ioh, wd_error, 0x5a); + /* but all of cyl_lo are. */ bus_space_write_1(iot, ioh, wd_cyl_lo, 0xa5); - if (bus_space_read_1(iot, ioh, wd_cyl_lo) == 0xff) { + if (bus_space_read_1(iot, ioh, wd_error) == 0x5a || + bus_space_read_1(iot, ioh, wd_cyl_lo) != 0xa5) { /* * Test for a controller with no IDE master, just one * ATAPI device. Select drive 1, and try again. */ bus_space_write_1(iot, ioh, wd_sdh, WDSD_IBM | 0x10); + bus_space_write_1(iot, ioh, wd_error, 0x5a); bus_space_write_1(iot, ioh, wd_cyl_lo, 0xa5); - if (bus_space_read_1(iot, ioh, wd_cyl_lo) == 0xff) + if (bus_space_read_1(iot, ioh, wd_error) == 0x5a || + bus_space_read_1(iot, ioh, wd_cyl_lo) != 0xa5) goto nomatch; wdc->sc_flags |= WDCF_ONESLAVE; } |