aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2009-09-15 04:27:24 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 13:05:58 -0400
commit0e3631593c38e8a09bf58a46c6f6a3426d3ad0f0 (patch)
treee5b47555b2f4611c9c478367fe9000d3812c62b1 /drivers/pci
parentd689f7eb364a51ccd857605dede0d6c22a1aad91 (diff)
PCI: pciehp: remove hp_slot field
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. Acked-by: Alex Chiang <achiang@hp.com> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp.h1
-rw-r--r--drivers/pci/hotplug/pciehp_core.c4
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c6
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c5
4 files changed, 4 insertions, 12 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index d69a96cd9681..382c939ef7ae 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -73,7 +73,6 @@ do { \
73#define SLOT_NAME_SIZE 10 73#define SLOT_NAME_SIZE 10
74struct slot { 74struct slot {
75 u8 state; 75 u8 state;
76 u8 hp_slot;
77 u32 number; 76 u32 number;
78 struct controller *ctrl; 77 struct controller *ctrl;
79 struct hpc_ops *hpc_ops; 78 struct hpc_ops *hpc_ops;
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index cc3a852e38bd..3adca3cb502a 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -124,10 +124,10 @@ static int init_slot(struct controller *ctrl)
124 snprintf(name, SLOT_NAME_SIZE, "%u", slot->number); 124 snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);
125 125
126 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 " 126 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 "
127 "hp_slot=%x sun=%x slot_device_offset=%x\n", 127 "sun=%x slot_device_offset=%x\n",
128 pci_domain_nr(ctrl->pci_dev->subordinate), 128 pci_domain_nr(ctrl->pci_dev->subordinate),
129 ctrl->pci_dev->subordinate->number, 129 ctrl->pci_dev->subordinate->number,
130 slot->hp_slot, slot->number, ctrl->slot_device_offset); 130 slot->number, ctrl->slot_device_offset);
131 retval = pci_hp_register(hotplug, 131 retval = pci_hp_register(hotplug,
132 ctrl->pci_dev->subordinate, 0, name); 132 ctrl->pci_dev->subordinate, 0, name);
133 if (retval) { 133 if (retval) {
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 7e31728d8ca4..1b5e476a48b9 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -210,8 +210,8 @@ static int board_added(struct slot *p_slot)
210 struct controller *ctrl = p_slot->ctrl; 210 struct controller *ctrl = p_slot->ctrl;
211 struct pci_bus *parent = ctrl->pci_dev->subordinate; 211 struct pci_bus *parent = ctrl->pci_dev->subordinate;
212 212
213 ctrl_dbg(ctrl, "%s: slot device, slot offset, hp slot = 0, %d, %d\n", 213 ctrl_dbg(ctrl, "%s: slot device, slot offset = 0, %d\n",
214 __func__, ctrl->slot_device_offset, p_slot->hp_slot); 214 __func__, ctrl->slot_device_offset);
215 215
216 if (POWER_CTRL(ctrl)) { 216 if (POWER_CTRL(ctrl)) {
217 /* Power on slot */ 217 /* Power on slot */
@@ -268,8 +268,6 @@ static int remove_board(struct slot *p_slot)
268 if (retval) 268 if (retval)
269 return retval; 269 return retval;
270 270
271 ctrl_dbg(ctrl, "%s: hp_slot = %d\n", __func__, p_slot->hp_slot);
272
273 if (POWER_CTRL(ctrl)) { 271 if (POWER_CTRL(ctrl)) {
274 /* power off slot */ 272 /* power off slot */
275 retval = p_slot->hpc_ops->power_off_slot(p_slot); 273 retval = p_slot->hpc_ops->power_off_slot(p_slot);
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index bbbed34bce78..24b221572f07 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -497,8 +497,6 @@ static int hpc_power_on_slot(struct slot * slot)
497 u16 slot_status; 497 u16 slot_status;
498 int retval = 0; 498 int retval = 0;
499 499
500 ctrl_dbg(ctrl, "%s: slot->hp_slot %x\n", __func__, slot->hp_slot);
501
502 /* Clear sticky power-fault bit from previous power failures */ 500 /* Clear sticky power-fault bit from previous power failures */
503 retval = pciehp_readw(ctrl, PCI_EXP_SLTSTA, &slot_status); 501 retval = pciehp_readw(ctrl, PCI_EXP_SLTSTA, &slot_status);
504 if (retval) { 502 if (retval) {
@@ -578,8 +576,6 @@ static int hpc_power_off_slot(struct slot * slot)
578 int retval = 0; 576 int retval = 0;
579 int changed; 577 int changed;
580 578
581 ctrl_dbg(ctrl, "%s: slot->hp_slot %x\n", __func__, slot->hp_slot);
582
583 /* 579 /*
584 * Set Bad DLLP Mask bit in Correctable Error Mask 580 * Set Bad DLLP Mask bit in Correctable Error Mask
585 * Register. This is the workaround against Bad DLLP error 581 * Register. This is the workaround against Bad DLLP error
@@ -928,7 +924,6 @@ static int pcie_init_slot(struct controller *ctrl)
928 if (!slot) 924 if (!slot)
929 return -ENOMEM; 925 return -ENOMEM;
930 926
931 slot->hp_slot = 0;
932 slot->ctrl = ctrl; 927 slot->ctrl = ctrl;
933 slot->hpc_ops = ctrl->hpc_ops; 928 slot->hpc_ops = ctrl->hpc_ops;
934 slot->number = ctrl->first_slot; 929 slot->number = ctrl->first_slot;