From patchwork Fri Jul 30 17:13:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 116103 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6UJNJqX013817 for ; Fri, 30 Jul 2010 19:23:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754203Ab0G3RRn (ORCPT ); Fri, 30 Jul 2010 13:17:43 -0400 Received: from kroah.org ([198.145.64.141]:46143 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753828Ab0G3RRh (ORCPT ); Fri, 30 Jul 2010 13:17:37 -0400 Received: from localhost (c-24-16-163-131.hsd1.wa.comcast.net [24.16.163.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id 53F33484FC; Fri, 30 Jul 2010 10:17:37 -0700 (PDT) X-Mailbox-Line: From gregkh@clark.site Fri Jul 30 10:14:59 2010 Message-Id: <20100730171459.775901915@clark.site> User-Agent: quilt/0.48-11.2 Date: Fri, 30 Jul 2010 10:13:49 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: stable-review@kernel.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, "Michael S. Tsirkin" , Jesse Barnes , linux-pci@vger.kernel.org, Rusty Russell Subject: [001/165] virtio-pci: disable msi at startup In-Reply-To: <20100730171550.GA1299@kroah.com Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 30 Jul 2010 19:23:19 +0000 (UTC) --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2046,6 +2046,7 @@ void pci_msi_off(struct pci_dev *dev) pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control); } } +EXPORT_SYMBOL_GPL(pci_msi_off); #ifndef HAVE_ARCH_PCI_SET_DMA_MASK /* --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -635,6 +635,9 @@ static int __devinit virtio_pci_probe(st INIT_LIST_HEAD(&vp_dev->virtqueues); spin_lock_init(&vp_dev->lock); + /* Disable MSI/MSIX to bring device to a known good state. */ + pci_msi_off(pci_dev); + /* enable the device */ err = pci_enable_device(pci_dev); if (err)