From patchwork Fri Oct 23 05:03:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: matt@masarand.com X-Patchwork-Id: 534746 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 BDDB9141331 for ; Fri, 23 Oct 2015 16:05:49 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751131AbbJWFFs (ORCPT ); Fri, 23 Oct 2015 01:05:48 -0400 Received: from foo.masarand.uk ([104.200.29.153]:36208 "EHLO foo.masarand.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751096AbbJWFFs (ORCPT ); Fri, 23 Oct 2015 01:05:48 -0400 Received: from localhost.localdomain (shredder.masarand.uk [81.187.126.108]) by foo.masarand.uk (Postfix) with ESMTPSA id 2515CA9F3; Fri, 23 Oct 2015 06:05:47 +0100 (BST) From: Matthew Minter To: linux-pci@vger.kernel.org, bhelgaas@google.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, lorenzo.pieralisi@arm.com Cc: Matthew Minter Subject: [PATCH V4 06/29] PCI: Add a call to pci_assign_irq in do_pci_enable_device Date: Fri, 23 Oct 2015 06:03:39 +0100 Message-Id: <1445576642-29624-7-git-send-email-matt@masarand.com> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1445576642-29624-1-git-send-email-matt@masarand.com> References: <1445576642-29624-1-git-send-email-matt@masarand.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The pci_assign_irq function allows assignment of an irq to devices during device enable time rather than only at boot. Therefore call it in the do_pci_enable_device function during the enable device code path so this assignment can be performed. This patch will do nothing on arches which do not set the irq mapping function pointers and is therefore currently a noop, however as support for these function pointers is added to arch specific code this will cause irq asignment to migrate to device enable time allowing the new codepaths to be used. Signed-off-by: Matthew Minter --- drivers/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 6a9a111..6907312 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1226,6 +1226,8 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars) if (err < 0 && err != -EIO) return err; + pci_assign_irq(dev); + bridge = pci_upstream_bridge(dev); if (bridge) pcie_aspm_powersave_config_link(bridge);