Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178892
b: refs/heads/master
c: b49bfd3
h: refs/heads/master
v: v3
  • Loading branch information
Youquan,Song authored and Jesse Barnes committed Jan 4, 2010
1 parent 5885141 commit 4c3ae42
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 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: 1ae861e652b5457e7fa98ccbc55abea1e207916e
refs/heads/master: b49bfd32901625e4adcfee011d2b32a43b4db67d
20 changes: 19 additions & 1 deletion trunk/drivers/pci/pcie/aer/aer_inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ static int aer_inject(struct aer_error_inj *einj)
unsigned long flags;
unsigned int devfn = PCI_DEVFN(einj->dev, einj->fn);
int pos_cap_err, rp_pos_cap_err;
u32 sever;
u32 sever, mask;
int ret = 0;

dev = pci_get_domain_bus_and_slot((int)einj->domain, einj->bus, devfn);
Expand Down Expand Up @@ -374,6 +374,24 @@ static int aer_inject(struct aer_error_inj *einj)
err->header_log2 = einj->header_log2;
err->header_log3 = einj->header_log3;

pci_read_config_dword(dev, pos_cap_err + PCI_ERR_COR_MASK, &mask);
if (einj->cor_status && !(einj->cor_status & ~mask)) {
ret = -EINVAL;
printk(KERN_WARNING "The correctable error(s) is masked "
"by device\n");
spin_unlock_irqrestore(&inject_lock, flags);
goto out_put;
}

pci_read_config_dword(dev, pos_cap_err + PCI_ERR_UNCOR_MASK, &mask);
if (einj->uncor_status && !(einj->uncor_status & ~mask)) {
ret = -EINVAL;
printk(KERN_WARNING "The uncorrectable error(s) is masked "
"by device\n");
spin_unlock_irqrestore(&inject_lock, flags);
goto out_put;
}

rperr = __find_aer_error_by_dev(rpdev);
if (!rperr) {
rperr = rperr_alloc;
Expand Down

0 comments on commit 4c3ae42

Please sign in to comment.