Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17504
b: refs/heads/master
c: 81f1544
h: refs/heads/master
v: v3
  • Loading branch information
Kenji Kaneshige authored and Greg Kroah-Hartman committed Jan 9, 2006
1 parent d90b3fe commit 6ab51fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd5b50be8d8e8e6170da3a261fc625fd603f9dc4
refs/heads/master: 81f154427c0c50b6492d454abf98e15c1c2e354e
14 changes: 14 additions & 0 deletions trunk/drivers/pci/hotplug/shpchp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ static int get_power_status (struct hotplug_slot *slot, u8 *value);
static int get_attention_status (struct hotplug_slot *slot, u8 *value);
static int get_latch_status (struct hotplug_slot *slot, u8 *value);
static int get_adapter_status (struct hotplug_slot *slot, u8 *value);
static int get_address (struct hotplug_slot *slot, u32 *value);
static int get_max_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
static int get_cur_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);

Expand All @@ -77,6 +78,7 @@ static struct hotplug_slot_ops shpchp_hotplug_slot_ops = {
.get_attention_status = get_attention_status,
.get_latch_status = get_latch_status,
.get_adapter_status = get_adapter_status,
.get_address = get_address,
.get_max_bus_speed = get_max_bus_speed,
.get_cur_bus_speed = get_cur_bus_speed,
};
Expand Down Expand Up @@ -314,6 +316,18 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
return 0;
}

static int get_address (struct hotplug_slot *hotplug_slot, u32 *value)
{
struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
struct pci_bus *bus = slot->ctrl->pci_dev->subordinate;

dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);

*value = (pci_domain_nr(bus) << 16) | (slot->bus << 8) | slot->device;

return 0;
}

static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
{
struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
Expand Down

0 comments on commit 6ab51fa

Please sign in to comment.