diff options
author | rajesh.shah@intel.com <rajesh.shah@intel.com> | 2005-10-31 16:20:13 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-10 16:09:15 -0800 |
commit | 8239def1b56e0c0c8e0fd3754a12df3d60a64ed7 (patch) | |
tree | 330aad5965a885cbc8cd17f92cc8ac82e81a7a6b /drivers/pci/hotplug/pciehp_hpc.c | |
parent | a3a45ec8f8edaf088449e37fe81c99cbf580b9bd (diff) | |
download | linux-stable-8239def1b56e0c0c8e0fd3754a12df3d60a64ed7.tar.gz linux-stable-8239def1b56e0c0c8e0fd3754a12df3d60a64ed7.tar.bz2 linux-stable-8239def1b56e0c0c8e0fd3754a12df3d60a64ed7.zip |
[PATCH] pciehp: fix handling of power faults during hotplug
The current pciehp implementation reports a power-fail error
even if the condition has cleared by the time the corresponding
interrupt handling code gets a chance to run. This patch
fixes this problem.
Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 2d2539ba7303..f2b9b7686f28 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -481,7 +481,6 @@ static int hpc_query_power_fault(struct slot * slot) u16 slot_status; u8 pwr_fault; int retval = 0; - u8 status; DBG_ENTER_ROUTINE @@ -493,15 +492,13 @@ static int hpc_query_power_fault(struct slot * slot) retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(slot->ctrl->cap_base), slot_status); if (retval) { - err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__); + err("%s : Cannot check for power fault\n", __FUNCTION__); return retval; } pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1); - status = (pwr_fault != 1) ? 1 : 0; DBG_LEAVE_ROUTINE - /* Note: Logic 0 => fault */ - return status; + return pwr_fault; } static int hpc_set_attention_status(struct slot *slot, u8 value) |