From patchwork Wed Jun 18 05:56:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 361259 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 A5B2C140091 for ; Wed, 18 Jun 2014 15:54:01 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754878AbaFRFyA (ORCPT ); Wed, 18 Jun 2014 01:54:00 -0400 Received: from mga02.intel.com ([134.134.136.20]:15734 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756579AbaFRFx7 (ORCPT ); Wed, 18 Jun 2014 01:53:59 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 17 Jun 2014 22:53:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,499,1400050800"; d="scan'208";a="559351523" Received: from gerry-dev.bj.intel.com ([10.238.158.74]) by orsmga002.jf.intel.com with ESMTP; 17 Jun 2014 22:53:29 -0700 From: Jiang Liu To: Bjorn Helgaas , Ryan Desfosses , Jiang Liu Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [Patch] PCI/portdrv: Remove warning about invalid IRQ Date: Wed, 18 Jun 2014 13:56:21 +0800 Message-Id: <1403070985-31373-1-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org For hot-added PCIe ports, it always generates a warning message on x86 platforms when binding to portdrv as: "device [8086:0e0b] has invalid IRQ; check vendor BIOS". It's due to that we check pci_dev->irq before actually allocating IRQ for the PCI device: if (!dev->irq && dev->pin) { dev_warn(&dev->dev, "device [%04x:%04x] has invalid IRQ; " "check vendor BIOS\n", dev->vendor, dev->device); } status = pcie_port_device_register(dev); -->pci_enable_device(dev); -->pci_enable_device_flags() -->do_pci_enable_device() -->pcibios_enable_device() -->pcibios_enable_irq() This warning message isn't generated for PCIe ports present at boot time because x86 arch code has called acpi_pci_irq_enable() in pci_acpi_init() for each PCI device for safety. Signed-off-by: Jiang Liu --- Hi Bjorn, I have rebased it onto v3.16-rc1 and changed the patch title according to your suggestion. Thanks! Gerry diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 80887eaa0668..2ccc9b926ea7 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -203,10 +203,6 @@ static int pcie_portdrv_probe(struct pci_dev *dev, (pci_pcie_type(dev) != PCI_EXP_TYPE_DOWNSTREAM))) return -ENODEV; - if (!dev->irq && dev->pin) { - dev_warn(&dev->dev, "device [%04x:%04x] has invalid IRQ; check vendor BIOS\n", - dev->vendor, dev->device); - } status = pcie_port_device_register(dev); if (status) return status;