summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-06-02 18:02:48 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-06-02 18:02:48 +0000
commitf370fe6c2fcf38fc015604f251cf80e67cb4b57f (patch)
tree04eb92e6d81e5d01b942961e5747ea03d4e716f8
parent792fc20b1f6032d42d856ac0c918fb0cb587904f (diff)
Move the code that disables MSI out of azalia_configure_pci(), such that we
don't run it upon resume. We now save and restore the MSI registers in the generic PCI code, so it is no longer necessary and will hurt us when we actually start using MSI. ok jakemsr@
-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");