From 6df9b7c4442687bb0d55f7c12421948fc2f3adfb Mon Sep 17 00:00:00 2001 From: Jason Downs Date: Thu, 7 Oct 1999 18:47:20 +0000 Subject: Add a delay() before turning the motor off; some controllers don't see it otherwise. Also move the motor off up so that it always gets performed, even if the probe is overridden via config flags. --- sys/dev/isa/fd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/dev/isa') diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index 91f24aedd46..adf1e65526c 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.40 1999/01/07 06:14:48 niklas Exp $ */ +/* $OpenBSD: fd.c,v 1.41 1999/10/07 18:47:19 downsj Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -204,11 +204,14 @@ fdprobe(parent, match, aux) printf("\n"); } #endif + + /* turn off motor */ + delay(250000); + bus_space_write_1(iot, ioh, fdout, FDO_FRST); + /* flags & 0x20 forces the drive to be found even if it won't probe */ if (!(fa->fa_flags & 0x20) && (n != 2 || (fdc->sc_status[0] & 0xf8) != 0x20)) return 0; - /* turn off motor */ - bus_space_write_1(iot, ioh, fdout, FDO_FRST); return 1; } -- cgit v1.2.3