Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Avoid using unmaped PCI registers. From Wolfgang...



details:   https://anonhg.NetBSD.org/src/rev/257f176244ce
branches:  trunk
changeset: 790196:257f176244ce
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Sep 25 18:54:48 2013 +0000

description:
Avoid using unmaped PCI registers. From Wolfgang Stukenbrock in
PR kern/48236.

diffstat:

 sys/dev/pci/iavc_pci.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 23c9fb5d4ea1 -r 257f176244ce sys/dev/pci/iavc_pci.c
--- a/sys/dev/pci/iavc_pci.c    Wed Sep 25 06:19:22 2013 +0000
+++ b/sys/dev/pci/iavc_pci.c    Wed Sep 25 18:54:48 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iavc_pci.c,v 1.14 2012/10/27 17:18:32 chs Exp $        */
+/*     $NetBSD: iavc_pci.c,v 1.15 2013/09/25 18:54:48 martin Exp $     */
 
 /*
  * Copyright (c) 2001-2003 Cubical Solutions Ltd.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iavc_pci.c,v 1.14 2012/10/27 17:18:32 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iavc_pci.c,v 1.15 2013/09/25 18:54:48 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -139,8 +139,6 @@
        sc->sc_dma = 0;
        sc->dmat = pa->pa_dmat;
 
-       iavc_b1dma_reset(sc);
-
        if (pci_mapreg_map(pa, IAVC_PCI_IOBA, PCI_MAPREG_TYPE_IO, 0,
                &sc->sc_io_bt, &sc->sc_io_bh, &psc->io_base, &psc->io_size)) {
                aprint_error(": unable to map i/o registers\n");
@@ -154,6 +152,8 @@
        }
        aprint_normal(": %s\n", pp->name);
 
+       iavc_b1dma_reset(sc);
+
        if (pp->npp_product == PCI_PRODUCT_AVM_T1) {
                aprint_error_dev(sc->sc_dev, "sorry, PRI not yet supported\n");
                return;



Home | Main Index | Thread Index | Old Index