From: Konrad Rzeszutek Wilk Date: Fri, 27 Feb 2015 21:11:06 +0000 (-0500) Subject: xen/pciback: Don't print scary messages when unsupported by hypervisor. X-Git-Tag: v4.1-rc1~111^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=74beaf6270f5b08159f1df8208322a24bb2905e6;p=karo-tx-linux.git xen/pciback: Don't print scary messages when unsupported by hypervisor. 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 Signed-off-by: David Vrabel --- diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index cc3cbb4435f8..258b7c325649 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c @@ -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); }