[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] MSI: also reject resource with flags all clear


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Mon, 02 Feb 2015 08:11:03 +0000
  • Delivery-date: Mon, 02 Feb 2015 08:11:14 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1422864341 -3600
# Node ID aeb8696ffa4b562620b72d28cc6f2f6562b015d4
# Parent  778d332748c23366362c6af4b074b7ca530c4e68
MSI: also reject resource with flags all clear

When resource assignment fails, things may end up this way, and we want
to avoid using the resource in that case.

Derived from an upstream patch by Yijing Wang <wangyijing@xxxxxxxxxx>.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 778d332748c2 -r aeb8696ffa4b drivers/pci/msi-xen.c
--- a/drivers/pci/msi-xen.c     Mon Feb 02 08:55:09 2015 +0100
+++ b/drivers/pci/msi-xen.c     Mon Feb 02 09:05:41 2015 +0100
@@ -204,7 +204,9 @@ static u64 find_table_base(struct pci_de
        bar = reg & PCI_MSIX_FLAGS_BIRMASK;
 
        flags = pci_resource_flags(dev, bar);
-       if (flags & (IORESOURCE_DISABLED | IORESOURCE_UNSET | IORESOURCE_BUSY))
+       if (!flags ||
+            (flags & (IORESOURCE_DISABLED | IORESOURCE_UNSET |
+                      IORESOURCE_BUSY)))
                return 0;
 
        return pci_resource_start(dev, bar);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.