Skip to contentSkip to conversation

don't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove

PATCH New Alex Williamson 1 participant 1 message Aug 7, 2008 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't WARN_ON -ENOSYS from PHYSDEVOP_manage_pci_remove

We let -ENOSYS slip through on the add side to support old hypervisors, let's do the same on the remove end so we don't get stack dumps during bootup.

--

drivers/xen/core/pci.c +7 -3
diff -r 2866e6af503e drivers/xen/core/pci.c
@@ -23,9 +23,13 @@ static int pci_bus_probe_wrapper(struct 
 		return r;
 
 	r = pci_bus_probe(dev);
-	if (r)
-		WARN_ON(HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
-					      &manage_pci));
+	if (r) {
+		int ret;
+
+		ret = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_remove,
+					    &manage_pci);
+		WARN_ON(ret && ret != -ENOSYS);
+	}
 
 	return r;
 }