Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1560638 > unrolled thread

[PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling

Started byMarc Zyngier <marc.zyngier@arm.com>
First post2017-01-17 15:30 +0100
Last post2017-01-17 16:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling Marc Zyngier <marc.zyngier@arm.com> - 2017-01-17 15:30 +0100
    Re: [PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration  handling Bjorn Helgaas <helgaas@kernel.org> - 2017-01-17 16:00 +0100

#1560638 — [PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling

FromMarc Zyngier <marc.zyngier@arm.com>
Date2017-01-17 15:30 +0100
Subject[PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
Message-ID<t0CVQ-8bo-23@gated-at.bofh.it>
The conversion to the new hotplug state machine introduced a regression
where a successful hotplug registration would be treated as an error,
effectively disabling the MSI driver forever.

Fix it by doing the proper check on the return value.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine")
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Duc Dang <dhdang@apm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
* From v1: added Sebastian's Ack and Duc's Tested-by, cc'ing linux-pci

 drivers/pci/host/pci-xgene-msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
index 1f38d08..f1b633b 100644
--- a/drivers/pci/host/pci-xgene-msi.c
+++ b/drivers/pci/host/pci-xgene-msi.c
@@ -517,7 +517,7 @@ static int xgene_msi_probe(struct platform_device *pdev)
 
 	rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "pci/xgene:online",
 			       xgene_msi_hwirq_alloc, NULL);
-	if (rc)
+	if (rc < 0)
 		goto err_cpuhp;
 	pci_xgene_online = rc;
 	rc = cpuhp_setup_state(CPUHP_PCI_XGENE_DEAD, "pci/xgene:dead", NULL,
-- 
2.1.4

[toc] | [next] | [standalone]


#1560684 — Re: [PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling

FromBjorn Helgaas <helgaas@kernel.org>
Date2017-01-17 16:00 +0100
SubjectRe: [PATCH v2] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
Message-ID<t0DoU-8lp-65@gated-at.bofh.it>
In reply to#1560638
On Tue, Jan 17, 2017 at 02:21:56PM +0000, Marc Zyngier wrote:
> The conversion to the new hotplug state machine introduced a regression
> where a successful hotplug registration would be treated as an error,
> effectively disabling the MSI driver forever.
> 
> Fix it by doing the proper check on the return value.
> 
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: stable@vger.kernel.org
> Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine")
> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Tested-by: Duc Dang <dhdang@apm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>

Applied to for-linus for v4.10, thanks!

> ---
> * From v1: added Sebastian's Ack and Duc's Tested-by, cc'ing linux-pci
> 
>  drivers/pci/host/pci-xgene-msi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c
> index 1f38d08..f1b633b 100644
> --- a/drivers/pci/host/pci-xgene-msi.c
> +++ b/drivers/pci/host/pci-xgene-msi.c
> @@ -517,7 +517,7 @@ static int xgene_msi_probe(struct platform_device *pdev)
>  
>  	rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "pci/xgene:online",
>  			       xgene_msi_hwirq_alloc, NULL);
> -	if (rc)
> +	if (rc < 0)
>  		goto err_cpuhp;
>  	pci_xgene_online = rc;
>  	rc = cpuhp_setup_state(CPUHP_PCI_XGENE_DEAD, "pci/xgene:dead", NULL,
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web