From patchwork Thu Oct 2 03:50:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: matt@masarand.com X-Patchwork-Id: 5015531 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 171F19FC0B for ; Thu, 2 Oct 2014 03:59:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3818920259 for ; Thu, 2 Oct 2014 03:59:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E9D420268 for ; Thu, 2 Oct 2014 03:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751528AbaJBD7a (ORCPT ); Wed, 1 Oct 2014 23:59:30 -0400 Received: from foo.masarand.uk ([69.164.217.139]:56330 "EHLO foo.masarand.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbaJBD7Z (ORCPT ); Wed, 1 Oct 2014 23:59:25 -0400 Received: from shredder.masarand.uk (shredder.masarand.uk [81.187.126.108]) by foo.masarand.uk (Postfix) with ESMTPSA id 6DCCEA170; Thu, 2 Oct 2014 04:51:04 +0100 (BST) From: matt@masarand.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, Matthew Minter Subject: [PATCH 07/18] Delayed cris setup of PCI IRQs to bus scan time Date: Thu, 2 Oct 2014 04:50:26 +0100 Message-Id: <1412221837-17452-8-git-send-email-matt@masarand.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412221837-17452-1-git-send-email-matt@masarand.com> References: <1412221837-17452-1-git-send-email-matt@masarand.com> Signed-off-by: Matthew Minter Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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: Matthew Minter PCI IRQs are currently configured to be enabled once at boot in a dedicated pass. This means that PCI devices which are hot-plugged after boot time will not be given an IRQ, this patch-set fixes this by registering the assignment function to be called later in the device enable path. --- arch/cris/arch-v32/drivers/pci/bios.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c index 64a5fb9..d04ecc8 100644 --- a/arch/cris/arch-v32/drivers/pci/bios.c +++ b/arch/cris/arch-v32/drivers/pci/bios.c @@ -80,20 +80,16 @@ int pcibios_enable_resources(struct pci_dev *dev, int mask) return 0; } -int pcibios_enable_irq(struct pci_dev *dev) +int pcibios_enable_irq(struct pci_dev *dev, u8 slot, u8 pin) { dev->irq = EXT_INTR_VECT; return 0; } -int pcibios_enable_device(struct pci_dev *dev, int mask) +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) { - int err; - - if ((err = pcibios_enable_resources(dev, mask)) < 0) - return err; - - if (!dev->msi_enabled) - pcibios_enable_irq(dev); + bridge->swizzle_irq = NULL; + bridge->map_irq = pcibios_enable_irq; return 0; } +