summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/azalia.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 8dafff76461..5af71ef17f7 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.195 2011/04/24 20:31:26 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.196 2011/06/02 18:02:47 kettenis Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -390,13 +390,6 @@ azalia_configure_pci(azalia_t *az)
pci_conf_write(az->pc, az->tag, ICH_PCI_HDTCSEL,
v & ~(ICH_PCI_HDTCSEL_MASK));
- /* disable MSI, use INTx instead */
- if (PCI_VENDOR(az->pciid) == PCI_VENDOR_INTEL) {
- reg = azalia_pci_read(az->pc, az->tag, ICH_PCI_MMC);
- reg &= ~(ICH_PCI_MMC_ME);
- azalia_pci_write(az->pc, az->tag, ICH_PCI_MMC, reg);
- }
-
/* enable PCIe snoop */
switch (PCI_PRODUCT(az->pciid)) {
case PCI_PRODUCT_ATI_SB450_HDA:
@@ -476,6 +469,7 @@ azalia_pci_attach(struct device *parent, struct device *self, void *aux)
azalia_t *sc;
struct pci_attach_args *pa;
pcireg_t v;
+ uint8_t reg;
pci_intr_handle_t ih;
const char *interrupt_str;
@@ -499,6 +493,13 @@ azalia_pci_attach(struct device *parent, struct device *self, void *aux)
azalia_configure_pci(sc);
+ /* disable MSI, use INTx instead */
+ if (PCI_VENDOR(sc->pciid) == PCI_VENDOR_INTEL) {
+ reg = azalia_pci_read(sc->pc, sc->tag, ICH_PCI_MMC);
+ reg &= ~(ICH_PCI_MMC_ME);
+ azalia_pci_write(sc->pc, sc->tag, ICH_PCI_MMC, reg);
+ }
+
/* interrupt */
if (pci_intr_map(pa, &ih)) {
printf(": can't map interrupt\n");