xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Tommi Airikka <tommi@airikka.net>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
	david.vrabel@citrix.com, boris.ostrovsky@oracle.com
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH 3/4] xen/pcifront: Report the errors better.
Date: Thu, 11 Feb 2016 16:10:25 -0500	[thread overview]
Message-ID: <1455225026-25792-4-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1455225026-25792-1-git-send-email-konrad.wilk@oracle.com>

The messages should be different depending on the type of error.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 arch/x86/include/asm/xen/pci.h | 4 ++--
 arch/x86/pci/xen.c             | 5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h
index 968d57d..f320ee3 100644
--- a/arch/x86/include/asm/xen/pci.h
+++ b/arch/x86/include/asm/xen/pci.h
@@ -57,7 +57,7 @@ static inline int xen_pci_frontend_enable_msi(struct pci_dev *dev,
 {
 	if (xen_pci_frontend && xen_pci_frontend->enable_msi)
 		return xen_pci_frontend->enable_msi(dev, vectors);
-	return -ENODEV;
+	return -ENOSYS;
 }
 static inline void xen_pci_frontend_disable_msi(struct pci_dev *dev)
 {
@@ -69,7 +69,7 @@ static inline int xen_pci_frontend_enable_msix(struct pci_dev *dev,
 {
 	if (xen_pci_frontend && xen_pci_frontend->enable_msix)
 		return xen_pci_frontend->enable_msix(dev, vectors, nvec);
-	return -ENODEV;
+	return -ENOSYS;
 }
 static inline void xen_pci_frontend_disable_msix(struct pci_dev *dev)
 {
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index ff31ab4..beac4df 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -196,7 +196,10 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 	return 0;
 
 error:
-	dev_err(&dev->dev, "Xen PCI frontend has not registered MSI/MSI-X support!\n");
+	if (ret == -ENOSYS)
+		dev_err(&dev->dev, "Xen PCI frontend has not registered MSI/MSI-X support!\n");
+	else if (ret)
+		dev_err(&dev->dev, "Xen PCI frontend error: %d!\n", ret);
 free:
 	kfree(v);
 	return ret;
-- 
2.1.0

  parent reply	other threads:[~2016-02-11 21:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 21:10 [PATCH] Fixes to Xen pcifront and pciback (v1) Konrad Rzeszutek Wilk
2016-02-11 21:10 ` [PATCH 1/4] xen/pciback: Check PF instead of VF for PCI_COMMAND_MEMORY Konrad Rzeszutek Wilk
2016-02-12  9:19   ` Jan Beulich
2016-02-11 21:10 ` [PATCH 2/4] xen/pciback: Save the number of MSI-X entries to be copied later Konrad Rzeszutek Wilk
2016-02-12  9:25   ` Jan Beulich
2016-02-11 21:10 ` Konrad Rzeszutek Wilk [this message]
2016-02-11 21:10 ` [PATCH 4/4] xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted Konrad Rzeszutek Wilk
2016-02-14  1:23   ` Boris Ostrovsky
     [not found]   ` <56BFD702.9010708@oracle.com>
2016-02-15 14:05     ` Konrad Rzeszutek Wilk
2016-02-15 14:37       ` Boris Ostrovsky
2016-02-15 14:27   ` David Vrabel
2016-02-15 14:35 ` [PATCH] Fixes to Xen pcifront and pciback (v1) David Vrabel
     [not found] ` <56C1E24C.5040704@citrix.com>
2016-02-15 14:38   ` David Vrabel
     [not found]   ` <56C1E2DE.7030507@citrix.com>
2016-02-15 15:35     ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455225026-25792-4-git-send-email-konrad.wilk@oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tommi@airikka.net \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).