summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMike Habeck <habeck@sgi.com>2006-05-06 09:01:59 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-19 14:13:23 -0700
commit466ee36b62b4b294ecf68a2eee2e18c6ff8c9be4 (patch)
tree4dd5ed1ad7a0d1081f687ea535e05f9ea838b08c /drivers/pci
parent82d5f4aaf182c306d2c2ef4d3a89d0fb8e386aa8 (diff)
downloadblackbird-op-linux-466ee36b62b4b294ecf68a2eee2e18c6ff8c9be4.tar.gz
blackbird-op-linux-466ee36b62b4b294ecf68a2eee2e18c6ff8c9be4.zip
[PATCH] SGI Hotplug: Incorrect power status
This is a repost of a patch submitted by Prarit Bhargava on 01-19-06 that never got integrated. The get_power_status function is currently reporting a bitwise mapping of the slot if the slot is powered on. It should return 1 if powered on and 0 if powered off. Signed-off-by: Mike Habeck <habeck@sgi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/sgi_hotplug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index cfee9db52c49..f31d83c2c633 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -461,10 +461,12 @@ static inline int get_power_status(struct hotplug_slot *bss_hotplug_slot,
{
struct slot *slot = bss_hotplug_slot->private;
struct pcibus_info *pcibus_info;
+ u32 power;
pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus);
mutex_lock(&sn_hotplug_mutex);
- *value = pcibus_info->pbi_enabled_devices & (1 << slot->device_num);
+ power = pcibus_info->pbi_enabled_devices & (1 << slot->device_num);
+ *value = power ? 1 : 0;
mutex_unlock(&sn_hotplug_mutex);
return 0;
}
OpenPOWER on IntegriCloud