From 16111ced9f66e331bc54ef2d3868280ac5f2f40e Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Fri, 3 Dec 1993 05:01:40 +0000 Subject: [PATCH] Reset fdc during probe. From: Changes between EPSILON and RELEASE of FreeBSD have again caused the kernel to not see my floppy disk drives. I don't know what happened, 'cause I don't see any changes to fd.c, but here is an old fix that I have applied to the probe routine which will solve the problem (at least for me). Since this is a rather brute-force solution - I understand if you want to ignore it... [Upgrading to pre-Beta FreeBSD caused this on my system. -AM] --- sys/dev/fdc/fdc.c | 8 +++++++- sys/i386/isa/fd.c | 8 +++++++- sys/isa/fd.c | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index 0cde9c6be32..462643f6679 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.6 1993/09/23 15:22:57 rgrimes Exp $ + * $Id: fd.c,v 1.7 1993/11/25 01:31:32 wollman Exp $ * */ @@ -211,6 +211,12 @@ fdprobe(dev) fdc_data[fdcu].baseport = dev->id_iobase; + /* First - lets reset the floppy controller */ + + outb(dev->id_iobase+fdout,0); + DELAY(100); + outb(dev->id_iobase+fdout,FDO_FRST); + /* see if it can handle a command */ if (out_fdc(fdcu,NE7CMD_SPECIFY) < 0) { diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c index 0cde9c6be32..462643f6679 100644 --- a/sys/i386/isa/fd.c +++ b/sys/i386/isa/fd.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.6 1993/09/23 15:22:57 rgrimes Exp $ + * $Id: fd.c,v 1.7 1993/11/25 01:31:32 wollman Exp $ * */ @@ -211,6 +211,12 @@ fdprobe(dev) fdc_data[fdcu].baseport = dev->id_iobase; + /* First - lets reset the floppy controller */ + + outb(dev->id_iobase+fdout,0); + DELAY(100); + outb(dev->id_iobase+fdout,FDO_FRST); + /* see if it can handle a command */ if (out_fdc(fdcu,NE7CMD_SPECIFY) < 0) { diff --git a/sys/isa/fd.c b/sys/isa/fd.c index 0cde9c6be32..462643f6679 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.6 1993/09/23 15:22:57 rgrimes Exp $ + * $Id: fd.c,v 1.7 1993/11/25 01:31:32 wollman Exp $ * */ @@ -211,6 +211,12 @@ fdprobe(dev) fdc_data[fdcu].baseport = dev->id_iobase; + /* First - lets reset the floppy controller */ + + outb(dev->id_iobase+fdout,0); + DELAY(100); + outb(dev->id_iobase+fdout,FDO_FRST); + /* see if it can handle a command */ if (out_fdc(fdcu,NE7CMD_SPECIFY) < 0) {