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 do IO before we have set the tag and handle.



details:   https://anonhg.NetBSD.org/src/rev/91cc030f80f0
branches:  trunk
changeset: 476352:91cc030f80f0
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Sep 14 09:29:05 1999 +0000

description:
Don't do IO before we have set the tag and handle.

diffstat:

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

diffs (29 lines):

diff -r c24c675117f7 -r 91cc030f80f0 sys/dev/pci/uhci_pci.c
--- a/sys/dev/pci/uhci_pci.c    Tue Sep 14 05:59:53 1999 +0000
+++ b/sys/dev/pci/uhci_pci.c    Tue Sep 14 09:29:05 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci_pci.c,v 1.9 1999/09/14 01:07:14 augustss Exp $    */
+/*     $NetBSD: uhci_pci.c,v 1.10 1999/09/14 09:29:05 augustss Exp $   */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -98,9 +98,6 @@
        pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo);
        printf(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(pa->pa_class));
 
-       /* Disable interrupts, so we don't can any spurious ones. */
-       bus_space_write_2(sc->iot, sc->ioh, UHCI_INTR, 0);
-
        /* Map I/O registers */
        if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
                           &sc->iot, &sc->ioh, NULL, NULL)) {
@@ -108,6 +105,9 @@
                return;
        }
 
+       /* Disable interrupts, so we don't get any spurious ones. */
+       bus_space_write_2(sc->iot, sc->ioh, UHCI_INTR, 0);
+
        sc->sc_bus.dmatag = pa->pa_dmat;
 
        /* Enable the device. */



Home | Main Index | Thread Index | Old Index