From 4e26dd8d9d814d2ef358b6679f15cd3ea507f8d9 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 8 Aug 2009 20:44:36 +0000 Subject: [PATCH] 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. --- sys/dev/pci/if_ral_pci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_ral_pci.c b/sys/dev/pci/if_ral_pci.c index dcb1e34050b8..748685863f95 100644 --- a/sys/dev/pci/if_ral_pci.c +++ b/sys/dev/pci/if_ral_pci.c @@ -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 -__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 @@ ral_pci_attach(device_t parent, device_t self, void *aux) 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 |