From patchwork Thu Nov 5 03:05:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 57819 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA533s30010958 for ; Thu, 5 Nov 2009 03:05:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751123AbZKEDFT (ORCPT ); Wed, 4 Nov 2009 22:05:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750789AbZKEDFT (ORCPT ); Wed, 4 Nov 2009 22:05:19 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:60987 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbZKEDFS (ORCPT ); Wed, 4 Nov 2009 22:05:18 -0500 Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id nA535MUF020225 (envelope-from kaneshige.kenji@jp.fujitsu.com); Thu, 5 Nov 2009 12:05:22 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 3858D45DE4C; Thu, 5 Nov 2009 12:05:22 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id 1B77C45DE4F; Thu, 5 Nov 2009 12:05:22 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id ED44E1DB803F; Thu, 5 Nov 2009 12:05:21 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.249.87.106]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 72FDC1DB8040; Thu, 5 Nov 2009 12:05:21 +0900 (JST) Received: from m106.css.fujitsu.com (m106 [127.0.0.1]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id 4B2115B89CB; Thu, 5 Nov 2009 12:05:21 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m106.s.css.fujitsu.com (Postfix) with ESMTP id E00AA5B86E1; Thu, 5 Nov 2009 12:05:20 +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]); Thu, 05 Nov 2009 12:05:19 +0900 (JST) Message-ID: <4AF240E7.8050200@jp.fujitsu.com> Date: Thu, 05 Nov 2009 12:05:11 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Bjorn Helgaas CC: Jesse Barnes , rdh@east.sun.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] pci/pcie: Avoid unnecessary PCIe link retrains References: <19184.41676.262206.134000@gargle.gargle.HOWL> <20091104110321.5e58e112@jbarnes-piketon> <200911041628.17905.bjorn.helgaas@hp.com> In-Reply-To: <200911041628.17905.bjorn.helgaas@hp.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Index: 20090825/drivers/pci/probe.c =================================================================== --- 20090825.orig/drivers/pci/probe.c +++ 20090825/drivers/pci/probe.c @@ -693,6 +693,7 @@ static void set_pcie_port_type(struct pc if (!pos) return; pdev->is_pcie = 1; + pdev->pcie_cap = pos; pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16); pdev->pcie_type = (reg16 & PCI_EXP_FLAGS_TYPE) >> 4; } Index: 20090825/include/linux/pci.h =================================================================== --- 20090825.orig/include/linux/pci.h +++ 20090825/include/linux/pci.h @@ -218,6 +218,7 @@ struct pci_dev { unsigned int class; /* 3 bytes: (base,sub,prog-if) */ u8 revision; /* PCI revision, low byte of class word */ u8 hdr_type; /* PCI header type (`multi' flag masked out) */ + u8 pcie_cap; /* PCI-E capability offset */ u8 pcie_type; /* PCI-E device/port type */ u8 rom_base_reg; /* which config register controls the ROM */ u8 pin; /* which interrupt pin this device uses */