Commit 8239def1 authored by rajesh.shah@intel.com's avatar rajesh.shah@intel.com Committed by Greg Kroah-Hartman

[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: default avatarRajesh Shah <rajesh.shah@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a3a45ec8
...@@ -481,7 +481,6 @@ static int hpc_query_power_fault(struct slot * slot) ...@@ -481,7 +481,6 @@ static int hpc_query_power_fault(struct slot * slot)
u16 slot_status; u16 slot_status;
u8 pwr_fault; u8 pwr_fault;
int retval = 0; int retval = 0;
u8 status;
DBG_ENTER_ROUTINE DBG_ENTER_ROUTINE
...@@ -493,15 +492,13 @@ static int hpc_query_power_fault(struct slot * slot) ...@@ -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); retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(slot->ctrl->cap_base), slot_status);
if (retval) { if (retval) {
err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__); err("%s : Cannot check for power fault\n", __FUNCTION__);
return retval; return retval;
} }
pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1); pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1);
status = (pwr_fault != 1) ? 1 : 0;
DBG_LEAVE_ROUTINE DBG_LEAVE_ROUTINE
/* Note: Logic 0 => fault */ return pwr_fault;
return status;
} }
static int hpc_set_attention_status(struct slot *slot, u8 value) static int hpc_set_attention_status(struct slot *slot, u8 value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment