From patchwork Fri Apr 22 07:43:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xulei X-Patchwork-Id: 92505 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 80CA310084B for ; Fri, 22 Apr 2011 17:42:22 +1000 (EST) Received: from VA3EHSOBE008.bigfish.com (va3ehsobe001.messaging.microsoft.com [216.32.180.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Cybertrust SureServer Standard Validation CA" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 8FA6C1007DC for ; Fri, 22 Apr 2011 17:42:10 +1000 (EST) Received: from mail86-va3-R.bigfish.com (10.7.14.250) by VA3EHSOBE008.bigfish.com (10.7.40.28) with Microsoft SMTP Server id 14.1.225.8; Fri, 22 Apr 2011 07:42:03 +0000 Received: from mail86-va3 (localhost.localdomain [127.0.0.1]) by mail86-va3-R.bigfish.com (Postfix) with ESMTP id 90B3617783E7; Fri, 22 Apr 2011 07:42:03 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail86-va3 (localhost.localdomain [127.0.0.1]) by mail86-va3 (MessageSwitch) id 1303458123501114_26015; Fri, 22 Apr 2011 07:42:03 +0000 (UTC) Received: from VA3EHSMHS017.bigfish.com (unknown [10.7.14.253]) by mail86-va3.bigfish.com (Postfix) with ESMTP id 76E0319C8046; Fri, 22 Apr 2011 07:42:03 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS017.bigfish.com (10.7.99.27) with Microsoft SMTP Server (TLS) id 14.1.225.8; Fri, 22 Apr 2011 07:42:03 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server id 14.1.270.2; Fri, 22 Apr 2011 02:42:02 -0500 Received: from localhost.localdomain (xulei-desktop.ap.freescale.net [10.193.20.42]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p3M7fxLf016617; Fri, 22 Apr 2011 02:42:00 -0500 (CDT) From: Lei Xu To: Subject: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller Date: Fri, 22 Apr 2011 15:43:39 +0800 Message-ID: <1303458219-31915-1-git-send-email-B33228@freescale.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: linux-pci@vger.kernel.org, kumar.gala@freescale.com, linuxppc-dev@lists.ozlabs.org, Lei Xu X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Root complex ports for Freescale PCIe host controller only receive interrupts, so if there is no irq setting for RC, it should not return error, otherwise it may result the PCIe host controller is disabled. Signed-off-by: Lei Xu --- drivers/pci/pcie/portdrv_core.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 595654a..95e64c8 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -209,7 +209,10 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask) irqs[i] = irq; irqs[PCIE_PORT_SERVICE_VC_SHIFT] = -1; - if (irq < 0) + /* Root complex ports for Freescale PCIe host controller only + * receive interrupts, so if there is no irq setting for RC, + * it should not return error. */ + if ((irq < 0) && (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT)) return -ENODEV; return 0; }