linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
@ 2017-01-11 10:26 Marc Zyngier
  2017-01-11 10:33 ` Sebastian Andrzej Siewior
  2017-01-11 19:14 ` Duc Dang
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Zyngier @ 2017-01-11 10:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Sebastian Andrzej Siewior, Duc Dang,
	Bjorn Helgaas, Thomas Gleixner

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.

Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine")
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Duc Dang <dhdang@apm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
  2017-01-11 10:26 [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling Marc Zyngier
@ 2017-01-11 10:33 ` Sebastian Andrzej Siewior
  2017-01-11 19:14 ` Duc Dang
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-01-11 10:33 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-kernel, linux-arm-kernel, Duc Dang, Bjorn Helgaas, Thomas Gleixner

On 2017-01-11 10:26:47 [+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.
> 
> Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine")
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling
  2017-01-11 10:26 [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling Marc Zyngier
  2017-01-11 10:33 ` Sebastian Andrzej Siewior
@ 2017-01-11 19:14 ` Duc Dang
  1 sibling, 0 replies; 3+ messages in thread
From: Duc Dang @ 2017-01-11 19:14 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Linux Kernel Mailing List, linux-arm, Sebastian Andrzej Siewior,
	Bjorn Helgaas, Thomas Gleixner

On Wed, Jan 11, 2017 at 2:26 AM, Marc Zyngier <marc.zyngier@arm.com> 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.

Thanks, Marc.

Tested-by: Duc Dang <dhdang@apm.com>

>
> Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine")
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Duc Dang <dhdang@apm.com>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: stable@vger.kernel.org
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
>  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
>
Regards,
Duc Dang.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-11 19:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11 10:26 [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling Marc Zyngier
2017-01-11 10:33 ` Sebastian Andrzej Siewior
2017-01-11 19:14 ` Duc Dang

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).