From patchwork Wed Oct 31 00:51:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taku Izumi X-Patchwork-Id: 195669 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 B4F262C0085 for ; Wed, 31 Oct 2012 11:52:26 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755302Ab2JaAwZ (ORCPT ); Tue, 30 Oct 2012 20:52:25 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:41454 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753293Ab2JaAwY (ORCPT ); Tue, 30 Oct 2012 20:52:24 -0400 Received: from m4.gw.fujitsu.co.jp (unknown [10.0.50.74]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id BE9693EE0BC for ; Wed, 31 Oct 2012 09:52:22 +0900 (JST) Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id A312045DE51 for ; Wed, 31 Oct 2012 09:52:22 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 8E76345DE4E for ; Wed, 31 Oct 2012 09:52:22 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 815A51DB803F for ; Wed, 31 Oct 2012 09:52:22 +0900 (JST) Received: from m0000.s.css.fujitsu.com (m0000.s.css.fujitsu.com [10.23.4.183]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 3B8C51DB8037 for ; Wed, 31 Oct 2012 09:52:22 +0900 (JST) Received: from m0000.css.fujitsu.com (m0000 [127.0.0.1]) by m0000.s.css.fujitsu.com (Postfix) with ESMTP id 2844A1013C1; Wed, 31 Oct 2012 09:52:22 +0900 (JST) Received: from DEUCALION (unknown [10.124.101.32]) by m0000.s.css.fujitsu.com (Postfix) with SMTP id 03427100500; Wed, 31 Oct 2012 09:52:22 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Date: Wed, 31 Oct 2012 09:51:48 +0900 From: Taku Izumi To: Bjorn Helgaas , linux-pci@vger.kernel.org, Jiang Liu , wangyijing@huawei.com Cc: Yinghai Lu Subject: [PATCH] PCI/portdrv: Fix regression introduced by commit 2dcfaf85 Message-Id: <20121031095148.75dbb6e8.izumi.taku@jp.fujitsu.com> X-Mailer: Sylpheed 3.1.1 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org PCI/portdrv: Fix regression introduced by commit 2dcfaf85 After commit 2dcfaf85, hotplug slots for port devices w/o slot implementation come to be created. This patch fixes this problem. Signed-off-by: Taku Izumi Acked-by: Yinghai Lu --- drivers/pci/pcie/portdrv_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: pci/drivers/pci/pcie/portdrv_core.c =================================================================== --- pci.orig/drivers/pci/pcie/portdrv_core.c +++ pci/drivers/pci/pcie/portdrv_core.c @@ -272,7 +272,8 @@ static int get_port_device_capability(st } /* Hot-Plug Capable */ - if (cap_mask & PCIE_PORT_SERVICE_HP) { + if ((cap_mask & PCIE_PORT_SERVICE_HP) && + dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT) { pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, ®32); if (reg32 & PCI_EXP_SLTCAP_HPC) { services |= PCIE_PORT_SERVICE_HP;