linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges
@ 2011-09-13 21:17 Timur Tabi
  2011-09-15 21:38 ` Scott Wood
  2011-10-12  4:19 ` Kumar Gala
  0 siblings, 2 replies; 3+ messages in thread
From: Timur Tabi @ 2011-09-13 21:17 UTC (permalink / raw)
  To: kumar.gala, scottwood, benh, linuxppc-dev

Commit 6820fead ("powerpc/fsl_msi: Handle msi-available-ranges better") added
support for multiple ranges in the msi-available-ranges property, but it
miscalculated the MSIR index when multiple ranges are used.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 arch/powerpc/sysdev/fsl_msi.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 419a772..1cca251 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -296,7 +296,7 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
 	}
 
 	msi->msi_virqs[irq_index] = virt_msir;
-	cascade_data->index = offset + irq_index;
+	cascade_data->index = offset;
 	cascade_data->msi_data = msi;
 	irq_set_handler_data(virt_msir, cascade_data);
 	irq_set_chained_handler(virt_msir, fsl_msi_cascade);
@@ -376,8 +376,10 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
 		goto error_out;
 	}
 
-	if (!p)
+	if (!p) {
 		p = all_avail;
+		len = sizeof(all_avail);
+	}
 
 	for (irq_index = 0, i = 0; i < len / (2 * sizeof(u32)); i++) {
 		if (p[i * 2] % IRQS_PER_MSI_REG ||
@@ -393,7 +395,7 @@ static int __devinit fsl_of_msi_probe(struct platform_device *dev)
 		count = p[i * 2 + 1] / IRQS_PER_MSI_REG;
 
 		for (j = 0; j < count; j++, irq_index++) {
-			err = fsl_msi_setup_hwirq(msi, dev, offset, irq_index);
+			err = fsl_msi_setup_hwirq(msi, dev, offset + j, irq_index);
 			if (err)
 				goto error_out;
 		}
-- 
1.7.3.4

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

* Re: [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges
  2011-09-13 21:17 [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges Timur Tabi
@ 2011-09-15 21:38 ` Scott Wood
  2011-10-12  4:19 ` Kumar Gala
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Wood @ 2011-09-15 21:38 UTC (permalink / raw)
  To: Timur Tabi; +Cc: kumar.gala, linuxppc-dev

On 09/13/2011 04:17 PM, Timur Tabi wrote:
> Commit 6820fead ("powerpc/fsl_msi: Handle msi-available-ranges better") added
> support for multiple ranges in the msi-available-ranges property, but it
> miscalculated the MSIR index when multiple ranges are used.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>  arch/powerpc/sysdev/fsl_msi.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)

Acked-by: Scott Wood <scottwood@freescale.com>

-Scott

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

* Re: [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges
  2011-09-13 21:17 [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges Timur Tabi
  2011-09-15 21:38 ` Scott Wood
@ 2011-10-12  4:19 ` Kumar Gala
  1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2011-10-12  4:19 UTC (permalink / raw)
  To: Timur Tabi; +Cc: scottwood, linuxppc-dev


On Sep 13, 2011, at 4:17 PM, Timur Tabi wrote:

> Commit 6820fead ("powerpc/fsl_msi: Handle msi-available-ranges =
better") added
> support for multiple ranges in the msi-available-ranges property, but =
it
> miscalculated the MSIR index when multiple ranges are used.
>=20
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/sysdev/fsl_msi.c |    8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)

applied

- k=

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

end of thread, other threads:[~2011-10-12  4:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13 21:17 [PATCH] powerpc/fsl_msi: fix support for multiple MSI ranges Timur Tabi
2011-09-15 21:38 ` Scott Wood
2011-10-12  4:19 ` Kumar Gala

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