From mboxrd@z Thu Jan 1 00:00:00 1970 From: neil@fatboyfat.co.uk (Neil Greatorex) Date: Fri, 4 Apr 2014 14:19:44 +0100 (BST) Subject: Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370) In-Reply-To: References: <20140325202249.GA10378@obsidianresearch.com> <20140325213638.5aba54b6@skate> <20140325222404.GC14718@obsidianresearch.com> <20140325223510.GD14718@obsidianresearch.com> <20140326201243.GA1536@obsidianresearch.com> <20140326214259.GA12330@obsidianresearch.com> <20140327044054.GA22681@obsidianresearch.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 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: --- 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