PCI: Fix pci-e port driver slot_reset bad default return value
When an upstream port reports an AER error to root port, kernel starts error recovery procedures. The default return value of function pcie_portdrv_slot_reset is PCI_ERS_RESULT_NONE. If all port service drivers of the downstream port under the upstream port have no slot_reset method in pci_error_handlers, AER recovery would stop without resume. Below patch against 2.6.30-rc3 fixes it. Signed-off-by: Zhang Yanmin <yanmin.zhang@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
f328ddc154
commit
029091df01
2 changed files with 4 additions and 1 deletions
|
@ -95,6 +95,9 @@ struct aer_broadcast_data {
|
|||
static inline pci_ers_result_t merge_result(enum pci_ers_result orig,
|
||||
enum pci_ers_result new)
|
||||
{
|
||||
if (new == PCI_ERS_RESULT_NONE)
|
||||
return orig;
|
||||
|
||||
switch (orig) {
|
||||
case PCI_ERS_RESULT_CAN_RECOVER:
|
||||
case PCI_ERS_RESULT_RECOVERED:
|
||||
|
|
|
@ -200,7 +200,7 @@ static int slot_reset_iter(struct device *device, void *data)
|
|||
|
||||
static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
|
||||
{
|
||||
pci_ers_result_t status = PCI_ERS_RESULT_NONE;
|
||||
pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
|
||||
int retval;
|
||||
|
||||
/* If fatal, restore cfg space for possible link reset at upstream */
|
||||
|
|
Loading…
Reference in a new issue