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: 7211181 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C7F549F336 for ; Thu, 17 Sep 2015 22:03:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF41A20723 for ; Thu, 17 Sep 2015 22:03:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10718204FC for ; Thu, 17 Sep 2015 22:03:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbbIQWDr (ORCPT ); Thu, 17 Sep 2015 18:03:47 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:36413 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbbIQWCW (ORCPT ); Thu, 17 Sep 2015 18:02:22 -0400 Received: by ioii196 with SMTP id i196so37711264ioi.3; 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 Cc: David Daney 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 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);