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

Neil Greatorex neil at fatboyfat.co.uk
Sat Apr 5 12:00:19 PDT 2014


Thomas, 


On Saturday, 5 April 2014 at 6:34pm, Thomas Petazzoni wrote:

> 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 at fatboyfat.co.uk (mailto:neil at fatboyfat.co.uk)>
> > 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 at fatboyfat.co.uk (mailto:neil at fatboyfat.co.uk)>
> > ---
> > 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.

I will redo the patch with a local variable tomorrow and resend it. 
 
Cheers, 
Neil




More information about the linux-arm-kernel mailing list