aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/hotplug/shpchp_core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c
index d81f8a75b495..a2b3f0010cec 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -65,6 +65,7 @@ static int get_power_status (struct hotplug_slot *slot, u8 *value);
65static int get_attention_status (struct hotplug_slot *slot, u8 *value); 65static int get_attention_status (struct hotplug_slot *slot, u8 *value);
66static int get_latch_status (struct hotplug_slot *slot, u8 *value); 66static int get_latch_status (struct hotplug_slot *slot, u8 *value);
67static int get_adapter_status (struct hotplug_slot *slot, u8 *value); 67static int get_adapter_status (struct hotplug_slot *slot, u8 *value);
68static int get_address (struct hotplug_slot *slot, u32 *value);
68static int get_max_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value); 69static int get_max_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
69static int get_cur_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value); 70static int get_cur_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
70 71
@@ -77,6 +78,7 @@ static struct hotplug_slot_ops shpchp_hotplug_slot_ops = {
77 .get_attention_status = get_attention_status, 78 .get_attention_status = get_attention_status,
78 .get_latch_status = get_latch_status, 79 .get_latch_status = get_latch_status,
79 .get_adapter_status = get_adapter_status, 80 .get_adapter_status = get_adapter_status,
81 .get_address = get_address,
80 .get_max_bus_speed = get_max_bus_speed, 82 .get_max_bus_speed = get_max_bus_speed,
81 .get_cur_bus_speed = get_cur_bus_speed, 83 .get_cur_bus_speed = get_cur_bus_speed,
82}; 84};
@@ -314,6 +316,18 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
314 return 0; 316 return 0;
315} 317}
316 318
319static int get_address (struct hotplug_slot *hotplug_slot, u32 *value)
320{
321 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
322 struct pci_bus *bus = slot->ctrl->pci_dev->subordinate;
323
324 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
325
326 *value = (pci_domain_nr(bus) << 16) | (slot->bus << 8) | slot->device;
327
328 return 0;
329}
330
317static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value) 331static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
318{ 332{
319 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); 333 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);