From patchwork Fri Apr 4 13:19:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Greatorex X-Patchwork-Id: 3938131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 713A09F334 for ; Fri, 4 Apr 2014 13:20:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D248201EC for ; Fri, 4 Apr 2014 13:20:35 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BCFD82037A for ; Fri, 4 Apr 2014 13:20:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW42k-0005SU-G9; Fri, 04 Apr 2014 13:20:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW42h-0000p7-W0; Fri, 04 Apr 2014 13:20:24 +0000 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WW42f-0000oH-I0 for linux-arm-kernel@lists.infradead.org; Fri, 04 Apr 2014 13:20:22 +0000 Received: by mail-wi0-f176.google.com with SMTP id r20so1252982wiv.9 for ; Fri, 04 Apr 2014 06:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fatboyfat.co.uk; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version:content-type; bh=zwQEDMS5EaI2vrhpu0N338YzYcEAPjhvUlvIVczLLhk=; b=dzZXwFxeVZ0SzznWO7kS3g10iy7Wkq+Y4mvx9FivRk8xcTW11v0WFMADgah8Wi6+qL ymYW1hZbgUtweCA2gCYzOKpq1j0XJO4YghWtAV694/I0DJsRuZO7tRl6gbCWK1K0KUWw R+07DPU8inSgW8I8CktYogsd9yb64HseuyyJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=zwQEDMS5EaI2vrhpu0N338YzYcEAPjhvUlvIVczLLhk=; b=k2z2PHcAm7+/Op++ADZ8411S2AJvU+EOUu/eewzXJY/6NCLhNPJNo5Z+MZ4LauA/JH 4NCyP0ZFc40z0EYre0l82Q9ddffNaFpI5IUn0Ec7gpx4LbVAdGjsMBe4s5WJ99fcd4MW g9LGzRvsaAXhl22XgwgP8i8NBZMBDmDXKOCQ5D32BPUIaztLQtCQcHl7gTRFovu8whK9 Yhv9IlizujVcqAoyR5xkhSX1Rn8yfxIMCj4SkaXKddyJ7WYw44rxVcWjC46cyjYSu32C 0c+qIoSSFNlx9HtxWtJus/XDvjIaYFbMCiuMjojuTeofcFPiM4UfrRZQFyTImnPGlCOH q4Pw== X-Gm-Message-State: ALoCoQnycTfx3nn/vHHBhjWRQFhAQL6iexpl2e2XuDXrS8ZqHc+cam0gyJHdvAzn44LlwFhviczF X-Received: by 10.181.9.65 with SMTP id dq1mr4423007wid.51.1396617595024; Fri, 04 Apr 2014 06:19:55 -0700 (PDT) Received: from vroombuntu.local (97e4e50d.skybroadband.com. [151.228.229.13]) by mx.google.com with ESMTPSA id fs8sm4658305wib.8.2014.04.04.06.19.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 04 Apr 2014 06:19:53 -0700 (PDT) Date: Fri, 4 Apr 2014 14:19:44 +0100 (BST) From: Neil Greatorex X-X-Sender: neil@vroombuntu To: Thomas Petazzoni Subject: Re: Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370) In-Reply-To: Message-ID: 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> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140404_092021_816578_4A0822F3 X-CRM114-Status: GOOD ( 20.02 ) X-Spam-Score: -2.0 (--) Cc: Willy Tarreau , linux-arm-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 = {