From patchwork Thu Sep 17 22:02:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 7211211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ECF7ABEEC1 for ; Thu, 17 Sep 2015 22:04:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E67320702 for ; Thu, 17 Sep 2015 22:04:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51214204FC for ; Thu, 17 Sep 2015 22:04:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZchGe-0003bf-Fn; Thu, 17 Sep 2015 22:03:00 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZchGM-0003Ri-BC for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2015 22:02:42 +0000 Received: by iofb144 with SMTP id b144so37861814iof.1 for ; Thu, 17 Sep 2015 15:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0bpU2DYL7UNQPptejh3hcNXTi9JSAYCm78JoTUn533Y=; b=Pp1pd9O3ChXYAP/0hqjRFEgFMfwO12oxKiBd7nmwS3lkLHmKoq7FtcLtxSOzCubUdf F/KYLf4Kmi63WSQkqInKIIfWRFRyl8YnrJGsZT1koVImdwkykyEv0ZUcuAF3PenH8Tdv FxxM7eJnGnFH/F6vmd1029vVfuee9bcLZQM0fEUCY4LStC07pqmYh07bxvwnKbneYb4C TrpdPQxXX/1g00ujSg3vMdE16wa/wEpUrxCSMowxbQXoaq6mTB0ZQtnfokHuXMTIX1AA SsWFCnnxtzrPgxHYA228rhEiqwEIqMbuv1eN6K+hA8AfIctYXpTfK3WFLMO2h28NTOJP bgIQ== X-Received: by 10.107.154.211 with SMTP id c202mr10126095ioe.53.1442527341571; Thu, 17 Sep 2015 15:02:21 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.194.ptr.us.xo.net. [64.2.3.194]) by smtp.gmail.com with ESMTPSA id o2sm5106254igr.9.2015.09.17.15.02.18 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 17 Sep 2015 15:02:20 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id t8HM2HeZ001229; Thu, 17 Sep 2015 15:02:17 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id t8HM2HZH001228; Thu, 17 Sep 2015 15:02:17 -0700 From: David Daney To: linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Will Deacon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Marc Zyngier Subject: [PATCH v2 2/5] PCI: generic: Only fixup irqs for bus we are creating. Date: Thu, 17 Sep 2015 15:02:09 -0700 Message-Id: <1442527332-1174-3-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1442527332-1174-1-git-send-email-ddaney.cavm@gmail.com> References: <1442527332-1174-1-git-send-email-ddaney.cavm@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150917_150242_439798_4192DAB7 X-CRM114-Status: GOOD ( 12.99 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Daney MIME-Version: 1.0 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: David Daney If we create multiple buses with pci-host-generic, or there are buses created by other drivers, we don't want to call pci_fixup_irqs() which operates on all devices, not just the devices on the bus being added. The consequence is that either the fixups are done more than once, or in some cases incorrect fixups could be applied. Call pci_bus_fixup_irqs() instead of pci_fixup_irqs(). Signed-off-by: David Daney Acked-by: Will Deacon --- Changes from v1: Moved most of the code to pci_bus_fixup_irqs(), making this patch very simple. drivers/pci/host/pci-host-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c index 265dd25..9e9f1c3 100644 --- a/drivers/pci/host/pci-host-generic.c +++ b/drivers/pci/host/pci-host-generic.c @@ -262,7 +262,7 @@ static int gen_pci_probe(struct platform_device *pdev) return -ENODEV; } - pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); + pci_bus_fixup_irqs(bus, pci_common_swizzle, of_irq_parse_and_map_pci); if (!pci_has_flag(PCI_PROBE_ONLY)) { pci_bus_size_bridges(bus);