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

[Xen-changelog] [linux-2.6.18-xen] PCI: suppress bogus warning on old hypervisors


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Wed, 26 Sep 2012 09:44:04 +0000
  • Delivery-date: Wed, 26 Sep 2012 09:44:12 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1348652101 -7200
# Node ID a752ff67b472662f15883f179e554cc64a87b272
# Parent  6741142f164f772e4a77d7a3a3fbfdbbb8f6e077
PCI: suppress bogus warning on old hypervisors

pci_bus_remove_wrapper() warned even for the -ENOSYS case. By detecting
the missing support early (in pci_bus_probe_wrapper()) we can avoid
this by removing the hooks altogether in this case.

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


diff -r 6741142f164f -r a752ff67b472 drivers/xen/core/pci.c
--- a/drivers/xen/core/pci.c    Wed Sep 26 11:32:20 2012 +0200
+++ b/drivers/xen/core/pci.c    Wed Sep 26 11:35:01 2012 +0200
@@ -45,8 +45,21 @@ static int pci_bus_probe_wrapper(struct 
                r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add,
                                          &manage_pci);
        }
-       if (r && r != -ENOSYS)
+
+       switch (r) {
+       case 0:
+               break;
+#if CONFIG_XEN_COMPAT < 0x030300
+       case -ENOSYS:
+               if (!manage_pci_ext.is_virtfn && !manage_pci_ext.is_extfn) {
+                       pci_bus_type.probe = pci_bus_probe;
+                       pci_bus_type.remove = pci_bus_remove;
+               }
+               break;
+#endif
+       default:
                return r;
+       }
 
        r = pci_bus_probe(dev);
        return r;

_______________________________________________
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®.