Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197911
b: refs/heads/master
c: 17e2185
h: refs/heads/master
i:
  197909: ad69b03
  197907: ce7ab2c
  197903: 88193f5
v: v3
  • Loading branch information
Hidetoshi Seto authored and Jesse Barnes committed May 11, 2010
1 parent a89fc4f commit 34715ab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88da13bfabbffb8f89574eb168b9da9a0abc693f
refs/heads/master: 17e21854bd59862f4ee47d1c7e828549f782711b
38 changes: 17 additions & 21 deletions trunk/drivers/pci/pcie/aer/aerdrv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,7 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev,
* error detected message to all downstream drivers within a hierarchy in
* question and return the returned code.
*/
static pci_ers_result_t do_recovery(struct pcie_device *aerdev,
struct pci_dev *dev,
static void do_recovery(struct pcie_device *aerdev, struct pci_dev *dev,
int severity)
{
pci_ers_result_t status, result = PCI_ERS_RESULT_RECOVERED;
Expand All @@ -484,10 +483,8 @@ static pci_ers_result_t do_recovery(struct pcie_device *aerdev,

if (severity == AER_FATAL) {
result = reset_link(aerdev, dev);
if (result != PCI_ERS_RESULT_RECOVERED) {
/* TODO: Should panic here? */
return result;
}
if (result != PCI_ERS_RESULT_RECOVERED)
goto failed;
}

if (status == PCI_ERS_RESULT_CAN_RECOVER)
Expand All @@ -508,13 +505,22 @@ static pci_ers_result_t do_recovery(struct pcie_device *aerdev,
report_slot_reset);
}

if (status == PCI_ERS_RESULT_RECOVERED)
broadcast_error_message(dev,
if (status != PCI_ERS_RESULT_RECOVERED)
goto failed;

broadcast_error_message(dev,
state,
"resume",
report_resume);

return status;
dev_printk(KERN_DEBUG, &dev->dev,
"AER driver successfully recovered\n");
return;

failed:
/* TODO: Should kernel panic here? */
dev_printk(KERN_DEBUG, &dev->dev,
"AER driver didn't recover\n");
}

/**
Expand All @@ -529,7 +535,6 @@ static void handle_error_source(struct pcie_device *aerdev,
struct pci_dev *dev,
struct aer_err_info *info)
{
pci_ers_result_t status = 0;
int pos;

if (info->severity == AER_CORRECTABLE) {
Expand All @@ -541,17 +546,8 @@ static void handle_error_source(struct pcie_device *aerdev,
if (pos)
pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS,
info->status);
} else {
status = do_recovery(aerdev, dev, info->severity);
if (status == PCI_ERS_RESULT_RECOVERED) {
dev_printk(KERN_DEBUG, &dev->dev, "AER driver "
"successfully recovered\n");
} else {
/* TODO: Should kernel panic here? */
dev_printk(KERN_DEBUG, &dev->dev, "AER driver didn't "
"recover\n");
}
}
} else
do_recovery(aerdev, dev, info->severity);
}

/**
Expand Down

0 comments on commit 34715ab

Please sign in to comment.