From owner-svn-src-head@FreeBSD.ORG Tue Jul 16 20:14:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7200082B; Tue, 16 Jul 2013 20:14:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 63ADEEE0; Tue, 16 Jul 2013 20:14:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6GKEOwX077665; Tue, 16 Jul 2013 20:14:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6GKEOfw077664; Tue, 16 Jul 2013 20:14:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307162014.r6GKEOfw077664@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 16 Jul 2013 20:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253398 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 16 Jul 2013 20:14:24 -0000 Author: kib Date: Tue Jul 16 20:14:23 2013 New Revision: 253398 URL: http://svnweb.freebsd.org/changeset/base/253398 Log: Add a tunable to force disable MSI use for xhci(4). Requested and tested by: delphij Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Tue Jul 16 19:20:50 2013 (r253397) +++ head/sys/dev/usb/controller/xhci_pci.c Tue Jul 16 20:14:23 2013 (r253398) @@ -132,6 +132,9 @@ xhci_pci_probe(device_t self) } } +static int xhci_use_msi = 1; +TUNABLE_INT("hw.usb.xhci.msi", &xhci_use_msi); + static void xhci_interrupt_poll(void *_sc) { @@ -171,13 +174,15 @@ xhci_pci_attach(device_t self) usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); sc->sc_irq_rid = 0; - count = pci_msi_count(self); - if (count >= 1) { - count = 1; - if (pci_alloc_msi(self, &count) == 0) { - if (bootverbose) - device_printf(self, "MSI enabled\n"); - sc->sc_irq_rid = 1; + if (xhci_use_msi) { + count = pci_msi_count(self); + if (count >= 1) { + count = 1; + if (pci_alloc_msi(self, &count) == 0) { + if (bootverbose) + device_printf(self, "MSI enabled\n"); + sc->sc_irq_rid = 1; + } } } sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ,