aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_core.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2009-12-13 08:11:32 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-22 19:15:17 -0500
commit3749c51ac6c1560aa1cb1520066bed84c6f8152a (patch)
tree3cbfb6a6d2df821e3e80ccce29ede8011b94246e /drivers/pci/hotplug/pciehp_core.c
parent536c8cb49eccd4f753b4782e7e975ef87359cb44 (diff)
PCI: Make current and maximum bus speeds part of the PCI core
Move the max_bus_speed and cur_bus_speed into the pci_bus. Expose the values through the PCI slot driver instead of the hotplug slot driver. Update all the hotplug drivers to use the pci_bus instead of their own data structures. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_core.c')
-rw-r--r--drivers/pci/hotplug/pciehp_core.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 5674b2075bdc..920f820edf87 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -69,8 +69,6 @@ static int get_power_status (struct hotplug_slot *slot, u8 *value);
69static int get_attention_status (struct hotplug_slot *slot, u8 *value); 69static int get_attention_status (struct hotplug_slot *slot, u8 *value);
70static int get_latch_status (struct hotplug_slot *slot, u8 *value); 70static int get_latch_status (struct hotplug_slot *slot, u8 *value);
71static int get_adapter_status (struct hotplug_slot *slot, u8 *value); 71static int get_adapter_status (struct hotplug_slot *slot, u8 *value);
72static int get_max_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
73static int get_cur_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
74 72
75/** 73/**
76 * release_slot - free up the memory used by a slot 74 * release_slot - free up the memory used by a slot
@@ -113,8 +111,6 @@ static int init_slot(struct controller *ctrl)
113 ops->disable_slot = disable_slot; 111 ops->disable_slot = disable_slot;
114 ops->get_power_status = get_power_status; 112 ops->get_power_status = get_power_status;
115 ops->get_adapter_status = get_adapter_status; 113 ops->get_adapter_status = get_adapter_status;
116 ops->get_max_bus_speed = get_max_bus_speed;
117 ops->get_cur_bus_speed = get_cur_bus_speed;
118 if (MRL_SENS(ctrl)) 114 if (MRL_SENS(ctrl))
119 ops->get_latch_status = get_latch_status; 115 ops->get_latch_status = get_latch_status;
120 if (ATTN_LED(ctrl)) { 116 if (ATTN_LED(ctrl)) {
@@ -227,27 +223,6 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
227 return pciehp_get_adapter_status(slot, value); 223 return pciehp_get_adapter_status(slot, value);
228} 224}
229 225
230static int get_max_bus_speed(struct hotplug_slot *hotplug_slot,
231 enum pci_bus_speed *value)
232{
233 struct slot *slot = hotplug_slot->private;
234
235 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
236 __func__, slot_name(slot));
237
238 return pciehp_get_max_link_speed(slot, value);
239}
240
241static int get_cur_bus_speed(struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
242{
243 struct slot *slot = hotplug_slot->private;
244
245 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n",
246 __func__, slot_name(slot));
247
248 return pciehp_get_cur_link_speed(slot, value);
249}
250
251static int pciehp_probe(struct pcie_device *dev) 226static int pciehp_probe(struct pcie_device *dev)
252{ 227{
253 int rc; 228 int rc;