From patchwork Tue Sep 15 08:27:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenji Kaneshige X-Patchwork-Id: 47609 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 n8F8RfPi015659 for ; Tue, 15 Sep 2009 08:27:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750738AbZIOI1g (ORCPT ); Tue, 15 Sep 2009 04:27:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750768AbZIOI1g (ORCPT ); Tue, 15 Sep 2009 04:27:36 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:38814 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbZIOI1g (ORCPT ); Tue, 15 Sep 2009 04:27:36 -0400 Received: from m2.gw.fujitsu.co.jp ([10.0.50.72]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id n8F8RcLG018417 for (envelope-from kaneshige.kenji@jp.fujitsu.com); Tue, 15 Sep 2009 17:27:38 +0900 Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 0EDF945DE51 for ; Tue, 15 Sep 2009 17:27:38 +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 95D7245DD75 for ; Tue, 15 Sep 2009 17:27:37 +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 304688F8008 for ; Tue, 15 Sep 2009 17:27:37 +0900 (JST) Received: from m108.s.css.fujitsu.com (m108.s.css.fujitsu.com [10.249.87.108]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id BEACE8F8006 for ; Tue, 15 Sep 2009 17:27:36 +0900 (JST) Received: from m108.css.fujitsu.com (m108 [127.0.0.1]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 8E4E7B68006; Tue, 15 Sep 2009 17:27:36 +0900 (JST) Received: from [127.0.0.1] (unknown [10.124.100.137]) by m108.s.css.fujitsu.com (Postfix) with ESMTP id 2F48AB68003; Tue, 15 Sep 2009 17:27:36 +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]); Tue, 15 Sep 2009 17:27:27 +0900 (JST) Message-ID: <4AAF4FEC.4040908@jp.fujitsu.com> Date: Tue, 15 Sep 2009 17:27: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 CC: ebiederm@xmission.com Subject: [PATCH 6/15] pciehp: remove hp_slot field References: <4AAF4F16.802@jp.fujitsu.com> In-Reply-To: <4AAF4F16.802@jp.fujitsu.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The hp_slot field is to identify the slot under the same controller. But, since PCIe downstream port has only one slot at most, it is meaningless and we don't need it. Signed-off-by: Kenji Kaneshige --- drivers/pci/hotplug/pciehp.h | 1 - drivers/pci/hotplug/pciehp_core.c | 4 ++-- drivers/pci/hotplug/pciehp_ctrl.c | 6 ++---- drivers/pci/hotplug/pciehp_hpc.c | 5 ----- 4 files changed, 4 insertions(+), 12 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: 20090915/drivers/pci/hotplug/pciehp.h =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp.h +++ 20090915/drivers/pci/hotplug/pciehp.h @@ -73,7 +73,6 @@ do { \ #define SLOT_NAME_SIZE 10 struct slot { u8 state; - u8 hp_slot; u32 number; struct controller *ctrl; struct hpc_ops *hpc_ops; Index: 20090915/drivers/pci/hotplug/pciehp_core.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_core.c +++ 20090915/drivers/pci/hotplug/pciehp_core.c @@ -124,10 +124,10 @@ static int init_slot(struct controller * snprintf(name, SLOT_NAME_SIZE, "%u", slot->number); ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 " - "hp_slot=%x sun=%x slot_device_offset=%x\n", + "sun=%x slot_device_offset=%x\n", pci_domain_nr(ctrl->pci_dev->subordinate), ctrl->pci_dev->subordinate->number, - slot->hp_slot, slot->number, ctrl->slot_device_offset); + slot->number, ctrl->slot_device_offset); retval = pci_hp_register(hotplug, ctrl->pci_dev->subordinate, 0, name); if (retval) { Index: 20090915/drivers/pci/hotplug/pciehp_ctrl.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_ctrl.c +++ 20090915/drivers/pci/hotplug/pciehp_ctrl.c @@ -210,8 +210,8 @@ static int board_added(struct slot *p_sl struct controller *ctrl = p_slot->ctrl; struct pci_bus *parent = ctrl->pci_dev->subordinate; - ctrl_dbg(ctrl, "%s: slot device, slot offset, hp slot = 0, %d, %d\n", - __func__, ctrl->slot_device_offset, p_slot->hp_slot); + ctrl_dbg(ctrl, "%s: slot device, slot offset = 0, %d\n", + __func__, ctrl->slot_device_offset); if (POWER_CTRL(ctrl)) { /* Power on slot */ @@ -268,8 +268,6 @@ static int remove_board(struct slot *p_s if (retval) return retval; - ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, p_slot->hp_slot); - if (POWER_CTRL(ctrl)) { /* power off slot */ retval = p_slot->hpc_ops->power_off_slot(p_slot); Index: 20090915/drivers/pci/hotplug/pciehp_hpc.c =================================================================== --- 20090915.orig/drivers/pci/hotplug/pciehp_hpc.c +++ 20090915/drivers/pci/hotplug/pciehp_hpc.c @@ -497,8 +497,6 @@ static int hpc_power_on_slot(struct slot u16 slot_status; int retval = 0; - ctrl_dbg(ctrl, "%s: slot->hp_slot %x\n", __func__, slot->hp_slot); - /* Clear sticky power-fault bit from previous power failures */ retval = pciehp_readw(ctrl, PCI_EXP_SLTSTA, &slot_status); if (retval) { @@ -578,8 +576,6 @@ static int hpc_power_off_slot(struct slo int retval = 0; int changed; - ctrl_dbg(ctrl, "%s: slot->hp_slot %x\n", __func__, slot->hp_slot); - /* * Set Bad DLLP Mask bit in Correctable Error Mask * Register. This is the workaround against Bad DLLP error @@ -928,7 +924,6 @@ static int pcie_init_slot(struct control if (!slot) return -ENOMEM; - slot->hp_slot = 0; slot->ctrl = ctrl; slot->hpc_ops = ctrl->hpc_ops; slot->number = ctrl->first_slot;