Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Explicitly set PCI_COMMAND_MASTER_ENABLE.



details:   https://anonhg.NetBSD.org/src/rev/23cdab8c5a2e
branches:  trunk
changeset: 758337:23cdab8c5a2e
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Nov 02 16:56:47 2010 +0000

description:
Explicitly set PCI_COMMAND_MASTER_ENABLE.

diffstat:

 sys/dev/pci/if_nfe.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r f940601e45c3 -r 23cdab8c5a2e sys/dev/pci/if_nfe.c
--- a/sys/dev/pci/if_nfe.c      Tue Nov 02 16:54:29 2010 +0000
+++ b/sys/dev/pci/if_nfe.c      Tue Nov 02 16:56:47 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_nfe.c,v 1.51 2010/04/05 07:20:26 joerg Exp $        */
+/*     $NetBSD: if_nfe.c,v 1.52 2010/11/02 16:56:47 jakllsch Exp $     */
 /*     $OpenBSD: if_nfe.c,v 1.77 2008/02/05 16:52:50 brad Exp $        */
 
 /*-
@@ -21,7 +21,7 @@
 /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.51 2010/04/05 07:20:26 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_nfe.c,v 1.52 2010/11/02 16:56:47 jakllsch Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -219,7 +219,7 @@
        const char *intrstr;
        struct ifnet *ifp;
        bus_size_t memsize;
-       pcireg_t memtype;
+       pcireg_t memtype, csr;
        char devinfo[256];
        int mii_flags = 0;
 
@@ -258,6 +258,10 @@
 
        sc->sc_dmat = pa->pa_dmat;
 
+       csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+       csr |= PCI_COMMAND_MASTER_ENABLE;
+       pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, csr);
+
        sc->sc_flags = 0;
 
        switch (PCI_PRODUCT(pa->pa_id)) {



Home | Main Index | Thread Index | Old Index