Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197908
b: refs/heads/master
c: 4a0c096
h: refs/heads/master
v: v3
  • Loading branch information
Hidetoshi Seto authored and Jesse Barnes committed May 11, 2010
1 parent ce7ab2c commit 505ebb0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 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: bd17d4742d5a8cbedd41a1d44c0cdee84a532363
refs/heads/master: 4a0c096efd4383fc98aa40e195363f600ba814f8
18 changes: 13 additions & 5 deletions trunk/drivers/pci/pcie/aer/aerdrv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,21 @@ int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
}
EXPORT_SYMBOL_GPL(pci_cleanup_aer_uncorrect_error_status);

/**
* add_error_device - list device to be handled
* @e_info: pointer to error info
* @dev: pointer to pci_dev to be added
*/
static int add_error_device(struct aer_err_info *e_info, struct pci_dev *dev)
{
if (e_info->error_dev_num < AER_MAX_MULTI_ERR_DEVICES) {
e_info->dev[e_info->error_dev_num] = dev;
e_info->error_dev_num++;
return 1;
return 0;
}

return 0;
return -ENOSPC;
}


#define PCI_BUS(x) (((x) >> 8) & 0xff)

/**
Expand Down Expand Up @@ -183,7 +186,12 @@ static int find_device_iter(struct pci_dev *dev, void *data)
struct aer_err_info *e_info = (struct aer_err_info *)data;

if (is_error_source(dev, e_info)) {
add_error_device(e_info, dev);
/* List this device */
if (add_error_device(e_info, dev)) {
/* We cannot handle more... Stop iteration */
/* TODO: Should print error message here? */
return 1;
}

/* If there is only a single error, stop iteration */
if (!e_info->multi_error_valid)
Expand Down

0 comments on commit 505ebb0

Please sign in to comment.