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.



details:   https://anonhg.NetBSD.org/src/rev/d7c64072ff87
branches:  trunk
changeset: 467382:d7c64072ff87
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Mar 24 01:05:15 1999 +0000

description:
Make sure bus mastering is enabled.

diffstat:

 sys/dev/pci/if_en_pci.c   |  9 ++++++++-
 sys/dev/pci/if_epic_pci.c |  7 ++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r a9d6c4dbddab -r d7c64072ff87 sys/dev/pci/if_en_pci.c
--- a/sys/dev/pci/if_en_pci.c   Tue Mar 23 23:18:50 1999 +0000
+++ b/sys/dev/pci/if_en_pci.c   Wed Mar 24 01:05:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_en_pci.c,v 1.10 1998/06/08 06:55:55 thorpej Exp $   */
+/*     $NetBSD: if_en_pci.c,v 1.11 1999/03/24 01:05:15 thorpej Exp $   */
 
 /*
  *
@@ -201,6 +201,13 @@
   scp->en_pc = pa->pa_pc;
 
   /*
+   * make sure bus mastering is enabled
+   */
+  pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+    pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
+    PCI_COMMAND_MASTER_ENABLE);
+
+  /*
    * interrupt map
    */
 
diff -r a9d6c4dbddab -r d7c64072ff87 sys/dev/pci/if_epic_pci.c
--- a/sys/dev/pci/if_epic_pci.c Tue Mar 23 23:18:50 1999 +0000
+++ b/sys/dev/pci/if_epic_pci.c Wed Mar 24 01:05:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_epic_pci.c,v 1.5 1998/08/11 00:12:52 thorpej Exp $  */
+/*     $NetBSD: if_epic_pci.c,v 1.6 1999/03/24 01:05:15 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -162,6 +162,11 @@
 
        printf(": SMC EPIC/100 Fast Ethernet\n");
 
+       /* Make sure bus mastering is enabled. */
+       pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+           pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG) |
+           PCI_COMMAND_MASTER_ENABLE);
+
        /*
         * Map and establish our interrupt.
         */



Home | Main Index | Thread Index | Old Index