Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x68k/dev Before probing floppy drives, call NE7CMD_...



details:   https://anonhg.NetBSD.org/src/rev/8e798ba13239
branches:  trunk
changeset: 782076:8e798ba13239
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Oct 14 17:20:18 2012 +0000

description:
Before probing floppy drives, call NE7CMD_SENSEI and fdcresult()
to drain possible pending FDC interrupts.  Taken from sys/dev/isa/fd.c.
Hopefully might fix occasional fd drive probe failure (but not confirmed).

diffstat:

 sys/arch/x68k/dev/fd.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 1d83f3fad2e6 -r 8e798ba13239 sys/arch/x68k/dev/fd.c
--- a/sys/arch/x68k/dev/fd.c    Sun Oct 14 16:36:31 2012 +0000
+++ b/sys/arch/x68k/dev/fd.c    Sun Oct 14 17:20:18 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fd.c,v 1.101 2012/05/15 12:17:33 tsutsui Exp $ */
+/*     $NetBSD: fd.c,v 1.102 2012/10/14 17:20:18 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.101 2012/05/15 12:17:33 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.102 2012/10/14 17:20:18 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_m68k_arch.h"
@@ -516,6 +516,11 @@
 
        type = &fd_types[0];    /* XXX 1.2MB */
 
+       /* toss any interrupt status */
+       for (n = 0; n < 4; n++) {
+               out_fdc(iot, ioh, NE7CMD_SENSEI);
+               (void)fdcresult(fdc);
+       }
        intio_disable_intr(SICILIAN_INTR_FDC);
 
        /* select drive and turn on motor */



Home | Main Index | Thread Index | Old Index