Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59162
b: refs/heads/master
c: f0dce41
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Greg Kroah-Hartman committed Jul 11, 2007
1 parent 3f33f06 commit 3ad4076
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65b3bc358a3195ebe459761a248cf33a61539947
refs/heads/master: f0dce411930d16a678173e534594bca160f5eaff
16 changes: 16 additions & 0 deletions trunk/drivers/pci/pcie/aer/aerdrv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,21 @@ int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
return 0;
}

int pci_cleanup_aer_correct_error_status(struct pci_dev *dev)
{
int pos;
u32 status;

pos = pci_find_aer_capability(dev);
if (!pos)
return -EIO;

pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, &status);
pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, status);

return 0;
}

static int find_device_iter(struct device *device, void *data)
{
struct pci_dev *dev;
Expand Down Expand Up @@ -741,4 +756,5 @@ EXPORT_SYMBOL_GPL(pci_find_aer_capability);
EXPORT_SYMBOL_GPL(pci_enable_pcie_error_reporting);
EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting);
EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status);
EXPORT_SYMBOL_GPL(pci_cleanup_aer_correct_error_status);

2 changes: 2 additions & 0 deletions trunk/include/linux/aer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ extern int pci_enable_pcie_error_reporting(struct pci_dev *dev);
extern int pci_find_aer_capability(struct pci_dev *dev);
extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
extern int pci_cleanup_aer_correct_error_status(struct pci_dev *dev);
#else
#define pci_enable_pcie_error_reporting(dev) (-EINVAL)
#define pci_find_aer_capability(dev) (0)
#define pci_disable_pcie_error_reporting(dev) (-EINVAL)
#define pci_cleanup_aer_uncorrect_error_status(dev) (-EINVAL)
#define pci_cleanup_aer_correct_error_status(dev) (-EINVAL)
#endif

#endif //_AER_H_
Expand Down

0 comments on commit 3ad4076

Please sign in to comment.