From patchwork Fri Jul 30 17:50:18 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: 115939 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 o6UIhBSO006171 for ; Fri, 30 Jul 2010 18:43:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759700Ab0G3RyK (ORCPT ); Fri, 30 Jul 2010 13:54:10 -0400 Received: from kroah.org ([198.145.64.141]:57751 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759565Ab0G3RyF (ORCPT ); Fri, 30 Jul 2010 13:54:05 -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 38AA648B2D; Fri, 30 Jul 2010 10:54:05 -0700 (PDT) X-Mailbox-Line: From gregkh@clark.site Fri Jul 30 10:51:33 2010 Message-Id: <20100730175133.699182370@clark.site> User-Agent: quilt/0.48-11.2 Date: Fri, 30 Jul 2010 10:50:18 -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/205] virtio-pci: disable msi at startup In-Reply-To: <20100730175238.GA3924@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 18:43:12 +0000 (UTC) --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2294,6 +2294,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_MAX_SEGMENT_SIZE int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size) --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -636,6 +636,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)