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

[Xen-devel] [PATCH] linux-2.6.18/PCI: suppress bogus warning on old hypervisors


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxx>
  • From: "Jan Beulich" <JBeulich@xxxxxxxx>
  • Date: Tue, 25 Sep 2012 09:54:16 +0100
  • Delivery-date: Tue, 25 Sep 2012 08:54:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

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>

--- a/drivers/xen/core/pci.c
+++ b/drivers/xen/core/pci.c
@@ -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;



Attachment: xen-pci-bus-remove-warning.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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