From patchwork Wed Jul 29 05:39:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 38067 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 n6T5eOVq017214 for ; Wed, 29 Jul 2009 05:40:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751685AbZG2FkX (ORCPT ); Wed, 29 Jul 2009 01:40:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751840AbZG2FkX (ORCPT ); Wed, 29 Jul 2009 01:40:23 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:44483 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbZG2FkW (ORCPT ); Wed, 29 Jul 2009 01:40:22 -0400 Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n6T5eMTS018506 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Wed, 29 Jul 2009 14:40:22 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id E42C445DE4E for ; Wed, 29 Jul 2009 14:40:21 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id C478E45DE4F for ; Wed, 29 Jul 2009 14:40:21 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id A4FBAE38001 for ; Wed, 29 Jul 2009 14:40:21 +0900 (JST) Received: from m105.s.css.fujitsu.com (m105.s.css.fujitsu.com [10.249.87.105]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 560431DB803B for ; Wed, 29 Jul 2009 14:40:21 +0900 (JST) Received: from m105.css.fujitsu.com (m105 [127.0.0.1]) by m105.s.css.fujitsu.com (Postfix) with ESMTP id 2F5615D8005; Wed, 29 Jul 2009 14:40:21 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m105.s.css.fujitsu.com (Postfix) with ESMTP id B40385D8002; Wed, 29 Jul 2009 14:40: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]); Wed, 29 Jul 2009 14:40:02 +0900 (JST) Message-ID: <4A6FE0AE.1040305@jp.fujitsu.com> Date: Wed, 29 Jul 2009 14:39:58 +0900 From: Kenji Kaneshige User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: "linux-pci@vger.kernel.org" , Jesse Barnes CC: Matthew Wilcox Subject: [PATCH 2/2] PCI hotplug: add support for 5.0G link speed References: <4A6FE03D.9000600@jp.fujitsu.com> In-Reply-To: <4A6FE03D.9000600@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Add support for PCI-E 5.0 GT/s in max_bus_speed and cur_bus_speed. Signed-off-by: Kenji Kaneshige --- drivers/pci/hotplug/pci_hotplug_core.c | 1 + drivers/pci/hotplug/pciehp_hpc.c | 10 ++++++++-- include/linux/pci_hotplug.h | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) -- 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: 20090721/drivers/pci/hotplug/pciehp_hpc.c =================================================================== --- 20090721.orig/drivers/pci/hotplug/pciehp_hpc.c +++ 20090721/drivers/pci/hotplug/pciehp_hpc.c @@ -693,7 +693,10 @@ static int hpc_get_max_lnk_speed(struct switch (lnk_cap & 0x000F) { case 1: - lnk_speed = PCIE_2PT5GB; + lnk_speed = PCIE_2_5GB; + break; + case 2: + lnk_speed = PCIE_5_0GB; break; default: lnk_speed = PCIE_LNK_SPEED_UNKNOWN; @@ -772,7 +775,10 @@ static int hpc_get_cur_lnk_speed(struct switch (lnk_status & PCI_EXP_LNKSTA_CLS) { case 1: - lnk_speed = PCIE_2PT5GB; + lnk_speed = PCIE_2_5GB; + break; + case 2: + lnk_speed = PCIE_5_0GB; break; default: lnk_speed = PCIE_LNK_SPEED_UNKNOWN; Index: 20090721/include/linux/pci_hotplug.h =================================================================== --- 20090721.orig/include/linux/pci_hotplug.h +++ 20090721/include/linux/pci_hotplug.h @@ -62,7 +62,8 @@ enum pcie_link_width { }; enum pcie_link_speed { - PCIE_2PT5GB = 0x14, + PCIE_2_5GB = 0x14, + PCIE_5_0GB = 0x15, PCIE_LNK_SPEED_UNKNOWN = 0xFF, }; Index: 20090721/drivers/pci/hotplug/pci_hotplug_core.c =================================================================== --- 20090721.orig/drivers/pci/hotplug/pci_hotplug_core.c +++ 20090721/drivers/pci/hotplug/pci_hotplug_core.c @@ -87,6 +87,7 @@ static char *pci_bus_speed_strings[] = { "100 MHz PCIX 533", /* 0x12 */ "133 MHz PCIX 533", /* 0x13 */ "2.5 GT/s PCI-E", /* 0x14 */ + "5.0 GT/s PCI-E", /* 0x15 */ }; #ifdef CONFIG_HOTPLUG_PCI_CPCI