From patchwork Tue Sep 22 23:49:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 521489 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 5DD3614027C for ; Wed, 23 Sep 2015 09:52: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=rOcBYikU; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934495AbbIVXvq (ORCPT ); Tue, 22 Sep 2015 19:51:46 -0400 Received: from mail-ig0-f175.google.com ([209.85.213.175]:34778 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759617AbbIVXt0 (ORCPT ); Tue, 22 Sep 2015 19:49:26 -0400 Received: by igcpb10 with SMTP id pb10so109817108igc.1; Tue, 22 Sep 2015 16:49:26 -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=irj0AkmWtYEj6O2YI/iHghU/JxOoysSVYcXFkMP0WMU=; b=rOcBYikUc3S77E+7Y+WiA+a/IGnTcmM2SQT0DCr7JzTchywUnSKfAxfA94weR6EU24 8WwluZaiEsfOQ7vQ+JUVY/KIoVfBvb6bKN/R85n6Udc5QrE1TAH+4Q8b7fhcf2RL8fxH 7bnAN054cJMxEiQ/jPCmZc0nYRZExOaOOaXMCeGmxdYqd8Ef9tHwh4K9oIdeccbmujgj OwzzF7dk+cwStyHN/lllI6/s1vmKOVgCCxVY1s76U2jDfaK7aAMoyEvn2y2XAh9s7ocS 4BpeIZxbsLEdXtkMIo1fsmGCJVYmSEf0t8HeWH7htEzMvr8lmM/3Jxn457RY0ZUsbjgX vHTw== X-Received: by 10.50.79.166 with SMTP id k6mr20141274igx.24.1442965766078; Tue, 22 Sep 2015 16:49:26 -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 m18sm2313801ioi.44.2015.09.22.16.49.23 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 22 Sep 2015 16:49:24 -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 t8MNnMDT012974; Tue, 22 Sep 2015 16:49:22 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id t8MNnMeZ012973; Tue, 22 Sep 2015 16:49:22 -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 v3 2/6] PCI: generic: Only fixup irqs for bus we are creating. Date: Tue, 22 Sep 2015 16:49:13 -0700 Message-Id: <1442965757-12925-3-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1442965757-12925-1-git-send-email-ddaney.cavm@gmail.com> References: <1442965757-12925-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(). Signed-off-by: David Daney --- No change from v2. 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);