Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Make sure bus mastering is enabled; some broken ...



details:   https://anonhg.NetBSD.org/src/rev/6b138ff1a8f2
branches:  trunk
changeset: 473409:6b138ff1a8f2
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jun 01 19:17:59 1999 +0000

description:
Make sure bus mastering is enabled; some broken BIOSes don't set this
up properly.

diffstat:

 sys/dev/pci/if_de.c  |  8 +++++++-
 sys/dev/pci/if_fpa.c |  9 ++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r c68e2cf68366 -r 6b138ff1a8f2 sys/dev/pci/if_de.c
--- a/sys/dev/pci/if_de.c       Tue Jun 01 19:16:49 1999 +0000
+++ b/sys/dev/pci/if_de.c       Tue Jun 01 19:17:59 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_de.c,v 1.85 1999/05/18 23:52:57 thorpej Exp $       */
+/*     $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1994-1997 Matt Thomas (matt%3am-software.com@localhost)
@@ -5757,6 +5757,12 @@
            printf(": unable to map device registers\n");
            return;
        }
+
+       /* Make sure bus mastering is enabled. */
+       pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+                      pci_conf_read(pa->pa_pc, pa->pa_tag,
+                                    PCI_COMMAND_STATUS_REG) |
+                      PCI_COMMAND_MASTER_ENABLE);
     }
 #endif /* __NetBSD__ */
 
diff -r c68e2cf68366 -r 6b138ff1a8f2 sys/dev/pci/if_fpa.c
--- a/sys/dev/pci/if_fpa.c      Tue Jun 01 19:16:49 1999 +0000
+++ b/sys/dev/pci/if_fpa.c      Tue Jun 01 19:17:59 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_fpa.c,v 1.28 1998/08/13 02:10:53 eeh Exp $  */
+/*     $NetBSD: if_fpa.c,v 1.29 1999/06/01 19:18:00 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1995, 1996 Matt Thomas <matt%3am-software.com@localhost>
@@ -467,6 +467,13 @@
     }
 
     sc->sc_dmatag = pa->pa_dmat;
+
+    /* Make sure bus mastering is enabled. */
+    pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+                  pci_conf_read(pa->pa_pc, pa->pa_tag,
+                                PCI_COMMAND_STATUS_REG) |
+                  PCI_COMMAND_MASTER_ENABLE);
+
     sc->sc_pdq = pdq_initialize(sc->sc_csrtag, sc->sc_membase,
                                sc->sc_if.if_xname, 0,
                                (void *) sc, PDQ_DEFPA);



Home | Main Index | Thread Index | Old Index