From 11d5f0786289c679a70d60fb519d373229bb716c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 7 May 2015 18:22:42 +0200 Subject: [PATCH] dde_bsd: remove disabling of MSIs Issue #1498. --- repos/dde_bsd/patches/azalia_c.patch | 38 ++++++++++++++++++++++++++++ repos/dde_bsd/ports/dde_bsd.hash | 2 +- repos/dde_bsd/ports/dde_bsd.port | 2 +- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 repos/dde_bsd/patches/azalia_c.patch diff --git a/repos/dde_bsd/patches/azalia_c.patch b/repos/dde_bsd/patches/azalia_c.patch new file mode 100644 index 000000000..6499e383d --- /dev/null +++ b/repos/dde_bsd/patches/azalia_c.patch @@ -0,0 +1,38 @@ +diff --git a/dev/pci/azalia.c b/dev/pci/azalia.c +index b126ef6..f73c238 100644 +--- a/dev/pci/azalia.c ++++ b/dev/pci/azalia.c +@@ -492,7 +492,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; ++ // uint8_t reg; + pci_intr_handle_t ih; + const char *interrupt_str; + +@@ -518,12 +518,18 @@ 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); +- } ++ // This was added in CVS rev 1.168 because certain devices do not ++ // support MSIs. For reasons that are not clear yet, this breaks ++ // when using the platform_drv on x86 with MSI support and IOMMU ++ // enabled. All hw we tested seems to work fine when it is removed, ++ // even older kernels, e.g. OKL4, that use legacy IRQs, ++ // ++ // /* 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_msi(pa, &ih) && pci_intr_map(pa, &ih)) { diff --git a/repos/dde_bsd/ports/dde_bsd.hash b/repos/dde_bsd/ports/dde_bsd.hash index c5c5d906e..3423971e9 100644 --- a/repos/dde_bsd/ports/dde_bsd.hash +++ b/repos/dde_bsd/ports/dde_bsd.hash @@ -1 +1 @@ -74279f98408dcf0fcd90849659e73fd1cbb82e78 +8a8864f346418a483832c0fa28419f35fa3d5b78 diff --git a/repos/dde_bsd/ports/dde_bsd.port b/repos/dde_bsd/ports/dde_bsd.port index deb2f0328..48a79f331 100644 --- a/repos/dde_bsd/ports/dde_bsd.port +++ b/repos/dde_bsd/ports/dde_bsd.port @@ -20,6 +20,6 @@ PATCHES := $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/*.patch)) AUDIO_OPT := -p1 -d$(SRC_DIR_AUDIO) PATCH_OPT(patches/oppress_warning.patch) := $(AUDIO_OPT) -PATCH_OPT(patches/eap_c.patch) := $(AUDIO_OPT) +PATCH_OPT(patches/azalia_c.patch) := $(AUDIO_OPT) # vi: set ft=make :