Module Name:    src
Committed By:   jakllsch
Date:           Tue Nov  2 16:54:29 UTC 2010

Modified Files:
        src/sys/dev/pci: if_rtk_pci.c

Log Message:
Explicitly set PCI_COMMAND_MASTER_ENABLE, in case the platform firmware didn't.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_rtk_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_rtk_pci.c
diff -u src/sys/dev/pci/if_rtk_pci.c:1.41 src/sys/dev/pci/if_rtk_pci.c:1.42
--- src/sys/dev/pci/if_rtk_pci.c:1.41	Tue Jul 27 21:02:00 2010
+++ src/sys/dev/pci/if_rtk_pci.c	Tue Nov  2 16:54:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_rtk_pci.c,v 1.41 2010/07/27 21:02:00 jakllsch Exp $	*/
+/*	$NetBSD: if_rtk_pci.c,v 1.42 2010/11/02 16:54:29 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rtk_pci.c,v 1.41 2010/07/27 21:02:00 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rtk_pci.c,v 1.42 2010/11/02 16:54:29 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -158,6 +158,7 @@
 	bus_space_tag_t iot, memt;
 	bus_space_handle_t ioh, memh;
 	bus_size_t iosize, memsize;
+	pcireg_t csr;
 	const char *intrstr = NULL;
 	const struct rtk_type *t;
 	bool ioh_valid, memh_valid;
@@ -227,6 +228,10 @@
 
 	aprint_normal_dev(self, "interrupting at %s\n", intrstr);
 
+	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_dmat = pa->pa_dmat;
 	sc->sc_flags |= RTK_ENABLED;
 

Reply via email to