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, in cas...
details: https://anonhg.NetBSD.org/src/rev/f940601e45c3
branches: trunk
changeset: 758336:f940601e45c3
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Tue Nov 02 16:54:29 2010 +0000
description:
Explicitly set PCI_COMMAND_MASTER_ENABLE, in case the platform firmware didn't.
diffstat:
sys/dev/pci/if_rtk_pci.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r fb914b120493 -r f940601e45c3 sys/dev/pci/if_rtk_pci.c
--- a/sys/dev/pci/if_rtk_pci.c Tue Nov 02 16:45:48 2010 +0000
+++ b/sys/dev/pci/if_rtk_pci.c Tue Nov 02 16:54:29 2010 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index