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: 7469811 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 9AD93BEEA4 for ; Fri, 23 Oct 2015 05:05:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4C3E20279 for ; Fri, 23 Oct 2015 05:05:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 059EA20251 for ; Fri, 23 Oct 2015 05:05:51 +0000 (UTC) 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 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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);