xen/pciback: Don't print scary messages when unsupported by hypervisor.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 27 Feb 2015 21:11:06 +0000 (16:11 -0500)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 16 Mar 2015 14:49:14 +0000 (14:49 +0000)
We print at the warninig level messages such as:
pciback 0000:90:00.5: MSI-X preparation failed (-38)

which is due to the hypervisor not supporting this sub-hypercall
(which was added in Xen 4.3).

Instead of having scary messages all the time - only have it
when the hypercall is actually supported.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/xen/xen-pciback/pci_stub.c

index cc3cbb4435f8d61c15959e8146906c360c1a324b..258b7c3256499aa8105a3674a98c853f04f0ddc1 100644 (file)
@@ -118,7 +118,7 @@ static void pcistub_device_release(struct kref *kref)
                int err = HYPERVISOR_physdev_op(PHYSDEVOP_release_msix,
                                                &ppdev);
 
-               if (err)
+               if (err && err != -ENOSYS)
                        dev_warn(&dev->dev, "MSI-X release failed (%d)\n",
                                 err);
        }
@@ -402,7 +402,7 @@ static int pcistub_init_device(struct pci_dev *dev)
                };
 
                err = HYPERVISOR_physdev_op(PHYSDEVOP_prepare_msix, &ppdev);
-               if (err)
+               if (err && err != -ENOSYS)
                        dev_err(&dev->dev, "MSI-X preparation failed (%d)\n",
                                err);
        }