From patchwork Sun Apr 6 15:34:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Greatorex X-Patchwork-Id: 3943561 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 7A3B39F374 for ; Sun, 6 Apr 2014 15:35:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B77EB2018E for ; Sun, 6 Apr 2014 15:35:13 +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 BC1AE20395 for ; Sun, 6 Apr 2014 15:35:11 +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 1WWp5q-0004Lp-B4; Sun, 06 Apr 2014 15:34:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WWp5n-0003nv-UD; Sun, 06 Apr 2014 15:34:43 +0000 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WWp5k-0003lW-IX for linux-arm-kernel@lists.infradead.org; Sun, 06 Apr 2014 15:34:41 +0000 Received: by mail-wi0-f181.google.com with SMTP id hm4so3745433wib.2 for ; Sun, 06 Apr 2014 08:34:17 -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=ce3mvjVKOIed0E9ZQr0eFSNIk+7ClTatUHaDvVOQU+E=; b=Ej+96D5d3R2Nkl6yaRFRcxOM2JsTGS85nYrCwJiAbWrdZkwJ1MyHdo2V6Az6fnpU1/ P0usWuJHL7oWvrDoC/V5OU7i6+n3xMNXoQvrWlKmnhGauarf53HhdkwrcUEthXmpBDwN cwWtMEjatzqi5stGxiSDVnTybyUbSMID+ZEh8= 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=ce3mvjVKOIed0E9ZQr0eFSNIk+7ClTatUHaDvVOQU+E=; b=iCxPDmYIFblQJVZB+bA22KlBLlSQf9ua0NqxuKf2fAUdeOppX6p/jsBGR7SdtIZ+n8 OpkBXRT9t6Wg39wPFBxMddF7jePg+k/Ts1ZU89l95ougBsss3fj95SucOnszJhe+aIdp WDKKsP0ceaHHKUi7IPJnpj3BiTH7jCPM7hE0QPWC7soC+gxHwSvibY9dVK53qs5bwbLI VxooPSPgv0zSVKqi2oiG1XVwTIOuAs8/3hjmVkSEzRS65SwUUDfTn6iajn+XrkE3j097 TasxovRyzTGpCRd3Nt6PmU7/mk43WiqoMFmPRPsS7J4NzQ0IxiyRoZJ+KciFbv5fBZGa cHYQ== X-Gm-Message-State: ALoCoQku0Uky6wiqRBkO3WU0hCfPr8UqfvqO9OytsUQjZAXRyhGRbpwsy/sKnGT1wHHADkI7OHHa X-Received: by 10.180.37.12 with SMTP id u12mr19586175wij.0.1396798457468; Sun, 06 Apr 2014 08:34:17 -0700 (PDT) Received: from [2001:470:1f09:284::1b9d] ([2001:470:1f09:284::1b9d]) by mx.google.com with ESMTPSA id u6sm17930693wif.6.2014.04.06.08.34.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 06 Apr 2014 08:34:16 -0700 (PDT) Date: Sun, 6 Apr 2014 16:34:08 +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: <54BB31A2B04145E8908E0183FAB6B61B@fatboyfat.co.uk> 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> <20140405193435.50d8dd81@skate> <54BB31A2B04145E8908E0183FAB6B61B@fatboyfat.co.uk> 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-20140406_113440_815655_483C7017 X-CRM114-Status: GOOD ( 13.58 ) 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.4 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, On Sat, 5 Apr 2014, Neil Greatorex wrote: > I will redo the patch with a local variable tomorrow and resend it. > As promised, here is the updated patch. As before, I would appreciate comments and/or Tested-bys... Cheers, Neil From e5698a4ae6b21c7e78538e16d293123903abbb40 Mon Sep 17 00:00:00 2001 From: Neil Greatorex Date: Sun, 6 Apr 2014 16:10:43 +0100 Subject: [PATCH] irqchip: armada-370-xp: Fix releasing of MSIs Store the value of d->hwirq in a local variable as the real value is wiped out by calling irq_dispose_mapping. 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 Greatorex --- drivers/irqchip/irq-armada-370-xp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 5409564..916fae2 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -157,8 +157,10 @@ static void armada_370_xp_teardown_msi_irq(struct msi_chip *chip, unsigned int irq) { struct irq_data *d = irq_get_irq_data(irq); + unsigned long hwirq = d->hwirq; + irq_dispose_mapping(irq); - armada_370_xp_free_msi(d->hwirq); + armada_370_xp_free_msi(hwirq); } static struct irq_chip armada_370_xp_msi_irq_chip = {