Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isa 32 bits I/O ocasionally fails on some hardware, ...



details:   https://anonhg.NetBSD.org/src/rev/426d0f95d36c
branches:  trunk
changeset: 473081:426d0f95d36c
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed May 19 14:41:25 1999 +0000

description:
32 bits I/O ocasionally fails on some hardware, so the test succeed but
the kernel can get a 'protection fault trap' later. Enable the 32 bits I/O
test conditionally on a config flag, disabled by default (problem
reported by kurt.schreiner%uni-mainz.de@localhost).

diffstat:

 sys/dev/isa/wdc_isa.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (33 lines):

diff -r 79b6fcd1fd0b -r 426d0f95d36c sys/dev/isa/wdc_isa.c
--- a/sys/dev/isa/wdc_isa.c     Wed May 19 14:37:05 1999 +0000
+++ b/sys/dev/isa/wdc_isa.c     Wed May 19 14:41:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc_isa.c,v 1.14 1999/04/11 20:50:29 bouyer Exp $ */
+/*     $NetBSD: wdc_isa.c,v 1.15 1999/05/19 14:41:25 bouyer Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -55,9 +55,8 @@
 #define        WDC_ISA_AUXREG_OFFSET   0x206
 #define        WDC_ISA_AUXREG_NPORTS   1 /* XXX "fdc" owns ports 0x3f7/0x377 */
 
-/*
- * XXX This code currently doesn't even try to allow 32-bit data port use.
- */
+/* options passed via the 'flags' config keyword */
+#define WDC_OPTIONS_32 0x01 /* try to use 32bit data I/O */
 
 struct wdc_isa_softc {
        struct  wdc_softc sc_wdcdev;
@@ -150,8 +149,9 @@
                sc->sc_wdcdev.dma_finish = wdc_isa_dma_finish;
                wdc_isa_dma_setup(sc);
        }
-       sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_DATA32 |
-           WDC_CAPABILITY_PREATA;
+       sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_PREATA;
+       if (sc->sc_wdcdev.sc_dev.dv_cfdata->cf_flags & WDC_OPTIONS_32)
+               sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA32;
        sc->sc_wdcdev.PIO_cap = 0;
        sc->wdc_chanptr = &sc->wdc_channel;
        sc->sc_wdcdev.channels = &sc->wdc_chanptr;



Home | Main Index | Thread Index | Old Index