Module Name: src
Committed By: matt
Date: Sat Aug 8 20:44:36 UTC 2009
Modified Files:
src/sys/dev/pci: if_ral_pci.c
Log Message:
If we've had to enable MEM access, make sure our flags reflect that so that
pci_mapreg_map won't fail because it didn't know we did it.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/if_ral_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_ral_pci.c
diff -u src/sys/dev/pci/if_ral_pci.c:1.12 src/sys/dev/pci/if_ral_pci.c:1.13
--- src/sys/dev/pci/if_ral_pci.c:1.12 Tue May 12 08:23:01 2009
+++ src/sys/dev/pci/if_ral_pci.c Sat Aug 8 20:44:36 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ral_pci.c,v 1.12 2009/05/12 08:23:01 cegger Exp $ */
+/* $NetBSD: if_ral_pci.c,v 1.13 2009/08/08 20:44:36 matt Exp $ */
/* $OpenBSD: if_ral_pci.c,v 1.6 2006/01/09 20:03:43 damien Exp $ */
/*-
@@ -22,7 +22,7 @@
* PCI front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ral_pci.c,v 1.12 2009/05/12 08:23:01 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ral_pci.c,v 1.13 2009/08/08 20:44:36 matt Exp $");
#include "bpfilter.h"
@@ -145,6 +145,7 @@
reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
reg |= PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_MEM_ENABLE;
pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
+ pa->pa_flags |= PCI_FLAGS_MEM_ENABLED;
/* map control/status registers */
error = pci_mapreg_map(pa, RAL_PCI_BAR0, PCI_MAPREG_TYPE_MEM |