From patchwork Mon Feb 22 05:12:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 81080 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1M5Cepl014144 for ; Mon, 22 Feb 2010 05:12:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751114Ab0BVFMk (ORCPT ); Mon, 22 Feb 2010 00:12:40 -0500 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:56854 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940Ab0BVFMj (ORCPT ); Mon, 22 Feb 2010 00:12:39 -0500 Received: from m1.gw.fujitsu.co.jp ([10.0.50.71]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o1M5Cb8V002707 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Mon, 22 Feb 2010 14:12:37 +0900 Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 0E8D245DE4E for ; Mon, 22 Feb 2010 14:12:37 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id DFB5145DD70 for ; Mon, 22 Feb 2010 14:12:36 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id C48AC1DB804A for ; Mon, 22 Feb 2010 14:12:36 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.249.87.103]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 7F4BC1DB8045 for ; Mon, 22 Feb 2010 14:12:36 +0900 (JST) Received: from ml13.css.fujitsu.com (ml13 [127.0.0.1]) by ml13.s.css.fujitsu.com (Postfix) with ESMTP id 51FEBFD0017; Mon, 22 Feb 2010 14:12:36 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by ml13.s.css.fujitsu.com (Postfix) with ESMTP id 07CD1FD0007; Mon, 22 Feb 2010 14:12:35 +0900 (JST) X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Received: from KANE-LIFEBOOK[10.124.100.137] by KANE-LIFEBOOK (FujitsuOutboundMailChecker v1.3.1/9992[10.124.100.137]); Mon, 22 Feb 2010 14:12:28 +0900 (JST) Message-ID: <4B821238.5010505@jp.fujitsu.com> Date: Mon, 22 Feb 2010 14:12:24 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: linux-pci@vger.kernel.org, jbarnes@virtuousgeek.org, rjw@sisk.pl Subject: [PATCH 1/2] PCIe PME: use pci_is_pcie() References: <4B8211DD.6010601@jp.fujitsu.com> In-Reply-To: <4B8211DD.6010601@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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]); Mon, 22 Feb 2010 05:12:41 +0000 (UTC) Index: 20100218/drivers/pci/pcie/pme/pcie_pme.c =================================================================== --- 20100218.orig/drivers/pci/pcie/pme/pcie_pme.c +++ 20100218/drivers/pci/pcie/pme/pcie_pme.c @@ -144,7 +144,7 @@ static bool pcie_pme_walk_bus(struct pci list_for_each_entry(dev, &bus->devices, bus_list) { /* Skip PCIe devices in case we started from a root port. */ - if (!dev->is_pcie && pci_check_pme_status(dev)) { + if (!pci_is_pcie(dev) && pci_check_pme_status(dev)) { pm_request_resume(&dev->dev); ret = true; } @@ -177,7 +177,7 @@ static bool pcie_pme_from_pci_bridge(str if (!dev) return false; - if (dev->is_pcie && dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) { + if (pci_is_pcie(dev) && dev->pcie_type == PCI_EXP_TYPE_PCI_BRIDGE) { down_read(&pci_bus_sem); if (pcie_pme_walk_bus(bus)) found = true; @@ -389,7 +389,7 @@ static void pcie_pme_mark_devices(struct down_read(&pci_bus_sem); list_for_each_entry(dev, &bus->devices, bus_list) - if (dev->is_pcie + if (pci_is_pcie(dev) && dev->pcie_type == PCI_EXP_TYPE_RC_END) pcie_pme_set_native(dev, NULL); up_read(&pci_bus_sem);