Re: Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Neil Greatorex,

On Fri, 4 Apr 2014 14:19:44 +0100 (BST), Neil Greatorex wrote:

> From 50aa11018059704229dd43ca1016defdda04f90c Mon Sep 17 00:00:00 2001
> From: Neil Greatorex <neil@xxxxxxxxxxxxxxx>
> Date: Fri, 4 Apr 2014 13:47:09 +0100
> Subject: [PATCH] irqchip: armada-370-xp: Fix releasing of MSIs
> 
> This patch moves the call to irq_dispose_mapping() to after the call to
> armada_370_xp_free_msi(). Without this patch, the armada_370_xp_free_msi
> function would always free MSI#0, no matter what was passed to it.
> 
> Signed-off-by: <neil@xxxxxxxxxxxxxxx>
> ---
>   drivers/irqchip/irq-armada-370-xp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index 5409564..f5e129e 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -157,8 +157,8 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip,
>   					   unsigned int irq)
>   {
>   	struct irq_data *d = irq_get_irq_data(irq);
> -	irq_dispose_mapping(irq);
>   	armada_370_xp_free_msi(d->hwirq);
> +	irq_dispose_mapping(irq);
>   }
> 
>   static struct irq_chip armada_370_xp_msi_irq_chip = {

I want to give it some test, but as it is, I'd prefer to have the
irq_dispose_mapping() done before, and use a local variable to store
d->hwirq to that armada_370_xp_free_msi() can be called after
irq_dispose_mapping(). This is to ensure the sequence is symmetrical
with the MSI setup sequence.

Also, can you detail how you tested with just one port?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [CentOS ARM]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]     [Photos]