From owner-svn-src-head@FreeBSD.ORG Sun Feb 15 21:17:22 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE716106566B; Sun, 15 Feb 2009 21:17:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 822958FC08; Sun, 15 Feb 2009 21:17:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1FLHM3C096706; Sun, 15 Feb 2009 21:17:22 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1FLHM7J096705; Sun, 15 Feb 2009 21:17:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200902152117.n1FLHM7J096705@svn.freebsd.org> From: Alexander Motin Date: Sun, 15 Feb 2009 21:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188656 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2009 21:17:23 -0000 Author: mav Date: Sun Feb 15 21:17:21 2009 New Revision: 188656 URL: http://svn.freebsd.org/changeset/base/188656 Log: Enable MSI support by default. Still can be disabled using device.hints. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sun Feb 15 20:37:55 2009 (r188655) +++ head/sys/dev/sound/pci/hda/hdac.c Sun Feb 15 21:17:21 2009 (r188656) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20090131_0127" +#define HDA_DRV_TEST_REV "20090215_0128" SND_DECLARE_FILE("$FreeBSD$"); @@ -109,12 +109,6 @@ SND_DECLARE_FILE("$FreeBSD$"); #define hdac_lockassert(sc) snd_mtxassert((sc)->lock) #define hdac_lockowned(sc) mtx_owned((sc)->lock) -#undef HDAC_MSI_ENABLED -#if __FreeBSD_version >= 700026 || \ - (__FreeBSD_version < 700000 && __FreeBSD_version >= 602106) -#define HDAC_MSI_ENABLED 1 -#endif - #define HDA_FLAG_MATCH(fl, v) (((fl) & (v)) == (v)) #define HDA_DEV_MATCH(fl, v) ((fl) == (v) || \ (fl) == 0xffffffff || \ @@ -1750,13 +1744,11 @@ hdac_irq_alloc(struct hdac_softc *sc) irq = &sc->irq; irq->irq_rid = 0x0; -#ifdef HDAC_MSI_ENABLED if ((sc->flags & HDAC_F_MSI) && (result = pci_msi_count(sc->dev)) == 1 && pci_alloc_msi(sc->dev, &result) == 0) irq->irq_rid = 0x1; else -#endif sc->flags &= ~HDAC_F_MSI; irq->irq_res = bus_alloc_resource_any(sc->dev, SYS_RES_IRQ, @@ -1799,10 +1791,8 @@ hdac_irq_free(struct hdac_softc *sc) if (irq->irq_res != NULL) bus_release_resource(sc->dev, SYS_RES_IRQ, irq->irq_rid, irq->irq_res); -#ifdef HDAC_MSI_ENABLED - if ((sc->flags & HDAC_F_MSI) && irq->irq_rid == 0x1) + if (irq->irq_rid == 0x1) pci_release_msi(sc->dev); -#endif irq->irq_handle = NULL; irq->irq_res = NULL; irq->irq_rid = 0x0; @@ -4059,14 +4049,11 @@ hdac_attach(device_t dev) ); } -#ifdef HDAC_MSI_ENABLED if (resource_int_value(device_get_name(dev), - device_get_unit(dev), "msi", &i) == 0 && i != 0 && - pci_msi_count(dev) == 1) - sc->flags |= HDAC_F_MSI; - else -#endif + device_get_unit(dev), "msi", &i) == 0 && i == 0) sc->flags &= ~HDAC_F_MSI; + else + sc->flags |= HDAC_F_MSI; #if defined(__i386__) || defined(__amd64__) sc->flags |= HDAC_F_DMA_NOCACHE;