diff mbox

xen/pci: Bubble up error and fix description.

Message ID 1481034501-716-1-git-send-email-konrad.wilk@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Dec. 6, 2016, 2:28 p.m. UTC
The function is never called under PV guests, and only shows up
when MSI (or MSI-X) cannot be allocated. Convert the message
to include the error value.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 arch/x86/pci/xen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jürgen Groß Dec. 6, 2016, 2:34 p.m. UTC | #1
On 06/12/16 15:28, Konrad Rzeszutek Wilk wrote:
> The function is never called under PV guests, and only shows up
> when MSI (or MSI-X) cannot be allocated. Convert the message
> to include the error value.
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

> ---
>  arch/x86/pci/xen.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
> index bedfab9..e1fb269 100644
> --- a/arch/x86/pci/xen.c
> +++ b/arch/x86/pci/xen.c
> @@ -264,8 +264,8 @@ static int xen_hvm_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");
> +	dev_err(&dev->dev, "Failed to create MSI%s! ret=%d!\n",
> +		type == PCI_CAP_ID_MSI ? "" : "-X", irq);
>  	return irq;
>  }
>  
>
Jürgen Groß Dec. 8, 2016, 6:58 a.m. UTC | #2
On 06/12/16 15:28, Konrad Rzeszutek Wilk wrote:
> The function is never called under PV guests, and only shows up
> when MSI (or MSI-X) cannot be allocated. Convert the message
> to include the error value.
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Commited to xen/tip.git for-linus-4.10


Juergen
Konrad Rzeszutek Wilk Dec. 8, 2016, 6:53 p.m. UTC | #3
On Thu, Dec 08, 2016 at 07:58:29AM +0100, Juergen Gross wrote:
> On 06/12/16 15:28, Konrad Rzeszutek Wilk wrote:
> > The function is never called under PV guests, and only shows up
> > when MSI (or MSI-X) cannot be allocated. Convert the message
> > to include the error value.
> > 
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> Commited to xen/tip.git for-linus-4.10

Thank you!
> 
> 
> Juergen
>
diff mbox

Patch

diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index bedfab9..e1fb269 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -264,8 +264,8 @@  static int xen_hvm_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");
+	dev_err(&dev->dev, "Failed to create MSI%s! ret=%d!\n",
+		type == PCI_CAP_ID_MSI ? "" : "-X", irq);
 	return irq;
 }