From patchwork Fri Jul 30 06:24:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 115415 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6U6OG69010409 for ; Fri, 30 Jul 2010 06:25:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755290Ab0G3GYr (ORCPT ); Fri, 30 Jul 2010 02:24:47 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:33870 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755284Ab0G3GYr (ORCPT ); Fri, 30 Jul 2010 02:24:47 -0400 Received: from m4.gw.fujitsu.co.jp ([10.0.50.74]) by fgwmail6.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o6U6Oj1d019998 (envelope-from kaneshige.kenji@jp.fujitsu.com); Fri, 30 Jul 2010 15:24:46 +0900 Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id C4C4845DE6E; Fri, 30 Jul 2010 15:24:45 +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 A73E745DE60; Fri, 30 Jul 2010 15:24:45 +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 81B0E1DB803A; Fri, 30 Jul 2010 15:24:45 +0900 (JST) Received: from m108.s.css.fujitsu.com (m108.s.css.fujitsu.com [10.249.87.108]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 407131DB8037; Fri, 30 Jul 2010 15:24:45 +0900 (JST) Received: from m108.css.fujitsu.com (m108 [127.0.0.1]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 0EAA9428054; Fri, 30 Jul 2010 15:24:45 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.102.21]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 8BBE6428059; Fri, 30 Jul 2010 15:24:44 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.102.21] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.102.21]); Fri, 30 Jul 2010 15:24:22 +0900 (JST) Message-ID: <4C52700E.3020605@jp.fujitsu.com> Date: Fri, 30 Jul 2010 15:24:14 +0900 From: Kenji Kaneshige User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 MIME-Version: 1.0 To: "Rafael J. Wysocki" CC: Jesse Barnes , Len Brown , ACPI Devel Maling List , linux-pm@lists.linux-foundation.org, linux-pci@vger.kernel.org, Matthew Garrett , Hidetoshi Seto Subject: [PATCH 5/6] PCI: portdrv: disable native hot-plug interrupt References: <201007282323.56351.rjw@sisk.pl> <20100728144358.5e2c12ce@virtuousgeek.org> <4C510B90.9070302@jp.fujitsu.com> <201007291745.39285.rjw@sisk.pl> <4C526A85.3070902@jp.fujitsu.com> <4C526E3E.3000600@jp.fujitsu.com> In-Reply-To: <4C526E3E.3000600@jp.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 30 Jul 2010 06:25:20 +0000 (UTC) Index: linux-2.6.35-rc6/drivers/pci/pcie/portdrv_core.c =================================================================== --- linux-2.6.35-rc6.orig/drivers/pci/pcie/portdrv_core.c +++ linux-2.6.35-rc6/drivers/pci/pcie/portdrv_core.c @@ -253,8 +253,17 @@ static int get_port_device_capability(st /* Hot-Plug Capable */ if ((cap_mask & PCIE_PORT_SERVICE_HP) && (reg16 & PCI_EXP_FLAGS_SLOT)) { pci_read_config_dword(dev, pos + PCI_EXP_SLTCAP, ®32); - if (reg32 & PCI_EXP_SLTCAP_HPC) + if (reg32 & PCI_EXP_SLTCAP_HPC) { services |= PCIE_PORT_SERVICE_HP; + /* + * Disable hot-plug interrupts in case the hot-plug + * service driver is not loaded. + */ + pos += PCI_EXP_SLTCTL; + pci_read_config_word(dev, pos, ®16); + reg16 &= ~(PCI_EXP_SLTCTL_CCIE | PCI_EXP_SLTCTL_HPIE); + pci_write_config_word(dev, pos, reg16); + } } /* AER capable */ if ((cap_mask & PCIE_PORT_SERVICE_AER)