Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Don't try to bus_space_subregion() registers tha...



details:   https://anonhg.NetBSD.org/src/rev/c78600ef3401
branches:  trunk
changeset: 567196:c78600ef3401
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Jun 04 21:15:00 2004 +0000

description:
Don't try to bus_space_subregion() registers that didn't get mapped.
Problem reported and fix tested by Kurt Schreiner on port-alpha.

diffstat:

 sys/dev/pci/pciide_common.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r c89ac6433ce7 -r c78600ef3401 sys/dev/pci/pciide_common.c
--- a/sys/dev/pci/pciide_common.c       Fri Jun 04 20:11:17 2004 +0000
+++ b/sys/dev/pci/pciide_common.c       Fri Jun 04 21:15:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide_common.c,v 1.11 2004/05/25 20:42:41 thorpej Exp $       */
+/*     $NetBSD: pciide_common.c,v 1.12 2004/06/04 21:15:00 bouyer Exp $        */
 
 
 /*
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.11 2004/05/25 20:42:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.12 2004/06/04 21:15:00 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/malloc.h>
@@ -414,6 +414,9 @@
                    ", but unsupported register maptype (0x%x)", maptype);
        }
 
+       if (sc->sc_dma_ok == 0)
+               return;
+
        /*
         * Set up the default handles for the DMA registers.
         * Just reserve 32 bits for each handle, unless space



Home | Main Index | Thread Index | Old Index