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

Neil Greatorex neil at fatboyfat.co.uk
Fri Apr 4 06:19:44 PDT 2014


Thomas,

After managing to get the card detected on my mirabox, I have been looking 
into getting the thing actually working. With the information from Willy 
and my own investigations I knew there was some issue in the setting up of 
the MSIs for the card. Through adding a copious amount of printk()s I was 
able to determine that the initialisation for the igb driver allocates, 
frees and re-allocates 3 MSIs for the card. I noticed that in doing this 
there was a problem whereby any call to free an MSI was trying to free 
MSI#0. I was able to track this down to the fact that the mapping for the 
IRQ was being disposed before the MSI was actually freed. The below patch 
fixes this problem.

With this patch, I can get one port on the card working. With both ports 
enabled, I still get an OOPS, so some further work is needed.

I would appreciate it if you could test this patch and let me know if you 
find any problems.

Cheers,
Neil

>From 50aa11018059704229dd43ca1016defdda04f90c Mon Sep 17 00:00:00 2001
From: Neil Greatorex <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>
---
  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 = {
-- 
1.8.3.2





More information about the linux-arm-kernel mailing list