diff mbox

[v4,2/5] powerpc/eeh: Add warning message in eeh_dev_open()

Message ID 1407379640-13065-3-git-send-email-gwshan@linux.vnet.ibm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gavin Shan Aug. 7, 2014, 2:47 a.m. UTC
The patch adds one warning message in eeh_dev_open() in case the
PCI device can't be marked as passed through.

Suggested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/eeh.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Benjamin Herrenschmidt Aug. 8, 2014, 3:50 a.m. UTC | #1
On Thu, 2014-08-07 at 12:47 +1000, Gavin Shan wrote:
> The patch adds one warning message in eeh_dev_open() in case the
> PCI device can't be marked as passed through.
> 
> Suggested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> ---

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Alex, are you taking this or should I ?

>  arch/powerpc/kernel/eeh.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
> index 59a64f8..5d73a49 100644
> --- a/arch/powerpc/kernel/eeh.c
> +++ b/arch/powerpc/kernel/eeh.c
> @@ -1162,8 +1162,11 @@ int eeh_dev_open(struct pci_dev *pdev)
>  
>  	/* No EEH device or PE ? */
>  	edev = pci_dev_to_eeh_dev(pdev);
> -	if (!edev || !edev->pe)
> +	if (!edev || !edev->pe) {
> +		pr_warn_once("%s: PCI device %s not supported\n",
> +			     __func__, pci_name(pdev));
>  		goto out;
> +	}
>  
>  	/* Increase PE's pass through count */
>  	atomic_inc(&edev->pe->pass_dev_cnt);


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alex Williamson Aug. 8, 2014, 4:06 a.m. UTC | #2
On Fri, 2014-08-08 at 13:50 +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2014-08-07 at 12:47 +1000, Gavin Shan wrote:
> > The patch adds one warning message in eeh_dev_open() in case the
> > PCI device can't be marked as passed through.
> > 
> > Suggested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> > Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> > ---
> 
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> Alex, are you taking this or should I ?

You should take 1 & 2, AFAICT there's no dependencies between anything
in this series.  Thanks,

Alex

> >  arch/powerpc/kernel/eeh.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
> > index 59a64f8..5d73a49 100644
> > --- a/arch/powerpc/kernel/eeh.c
> > +++ b/arch/powerpc/kernel/eeh.c
> > @@ -1162,8 +1162,11 @@ int eeh_dev_open(struct pci_dev *pdev)
> >  
> >  	/* No EEH device or PE ? */
> >  	edev = pci_dev_to_eeh_dev(pdev);
> > -	if (!edev || !edev->pe)
> > +	if (!edev || !edev->pe) {
> > +		pr_warn_once("%s: PCI device %s not supported\n",
> > +			     __func__, pci_name(pdev));
> >  		goto out;
> > +	}
> >  
> >  	/* Increase PE's pass through count */
> >  	atomic_inc(&edev->pe->pass_dev_cnt);
> 
> 



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 59a64f8..5d73a49 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -1162,8 +1162,11 @@  int eeh_dev_open(struct pci_dev *pdev)
 
 	/* No EEH device or PE ? */
 	edev = pci_dev_to_eeh_dev(pdev);
-	if (!edev || !edev->pe)
+	if (!edev || !edev->pe) {
+		pr_warn_once("%s: PCI device %s not supported\n",
+			     __func__, pci_name(pdev));
 		goto out;
+	}
 
 	/* Increase PE's pass through count */
 	atomic_inc(&edev->pe->pass_dev_cnt);