From patchwork Fri Oct 2 18:44:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 525714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D1B79140D79 for ; Sat, 3 Oct 2015 04:47:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=x57YoTvV; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753565AbbJBSoP (ORCPT ); Fri, 2 Oct 2015 14:44:15 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:33972 "EHLO mail-io0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbbJBSoM (ORCPT ); Fri, 2 Oct 2015 14:44:12 -0400 Received: by iow1 with SMTP id 1so92657097iow.1; Fri, 02 Oct 2015 11:44:11 -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=ZzqY1aQkRJgnFFE07EKfIphUZ/DNP4yX69tzMTQgyDk=; b=x57YoTvV8hJrdrA1ObMuV2k0FPMFrNb9XrMOUrTLtxGjqmAxhySyBir5DJ7gBqsEFx vo17YdyWJ25splejsWgf+/4FsRfM8CD/Z+XKsNsOW0SB9ZY+dD8UR6v1m78QhiZuIa3a d4iZST0wK1eDGwuLzeKn3zUkPfhsnkUviAF7G5wr6N7/XUL2PUcbJd0gMS8vJ4gKvX4y eU8rZr9fbNdzIiI3GARkjZCzEcw0ysMISuRTrlE9+kPAt7FG2vgPATjDe0LvUJE8z0ms OiKKGwJa+QjCc8Z+0ijEQTm1EF2khczB5xT8Bl934ou2oooJxEb2J7polI+jRyOFgDPa ny9w== X-Received: by 10.107.170.32 with SMTP id t32mr18975447ioe.173.1443811451211; Fri, 02 Oct 2015 11:44:11 -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 f31sm5485608ioj.13.2015.10.02.11.44.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 Oct 2015 11:44:09 -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 t92Ii7hM018925; Fri, 2 Oct 2015 11:44:07 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id t92Ii6I0018924; Fri, 2 Oct 2015 11:44:06 -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 v4 2/5] PCI: generic: Only fixup irqs for bus we are creating. Date: Fri, 2 Oct 2015 11:44:00 -0700 Message-Id: <1443811443-18878-3-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1443811443-18878-1-git-send-email-ddaney.cavm@gmail.com> References: <1443811443-18878-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 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(). Acked-by: Will Deacon Signed-off-by: David Daney --- No change from v2. 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);