Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232487
b: refs/heads/master
c: 4bb9ebc
h: refs/heads/master
i:
  232485: 44de949
  232483: 9de04b0
  232479: a263fa2
v: v3
  • Loading branch information
Michael Chan authored and David S. Miller committed Jan 26, 2011
1 parent dffc1e0 commit 063c9d8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 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: 5138826b52f8bc441770069b1b305e1d1426ae9e
refs/heads/master: 4bb9ebc78097376b3734c6d3001a96aecac0f7bb
17 changes: 9 additions & 8 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -7966,11 +7966,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)

/* AER (Advanced Error Reporting) hooks */
err = pci_enable_pcie_error_reporting(pdev);
if (err) {
dev_err(&pdev->dev, "pci_enable_pcie_error_reporting "
"failed 0x%x\n", err);
/* non-fatal, continue */
}
if (!err)
bp->flags |= BNX2_FLAG_AER_ENABLED;

} else {
bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX);
Expand Down Expand Up @@ -8233,8 +8230,10 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
return 0;

err_out_unmap:
if (bp->flags & BNX2_FLAG_PCIE)
if (bp->flags & BNX2_FLAG_AER_ENABLED) {
pci_disable_pcie_error_reporting(pdev);
bp->flags &= ~BNX2_FLAG_AER_ENABLED;
}

if (bp->regview) {
iounmap(bp->regview);
Expand Down Expand Up @@ -8422,8 +8421,10 @@ bnx2_remove_one(struct pci_dev *pdev)

kfree(bp->temp_stats_blk);

if (bp->flags & BNX2_FLAG_PCIE)
if (bp->flags & BNX2_FLAG_AER_ENABLED) {
pci_disable_pcie_error_reporting(pdev);
bp->flags &= ~BNX2_FLAG_AER_ENABLED;
}

free_netdev(dev);

Expand Down Expand Up @@ -8539,7 +8540,7 @@ static pci_ers_result_t bnx2_io_slot_reset(struct pci_dev *pdev)
}
rtnl_unlock();

if (!(bp->flags & BNX2_FLAG_PCIE))
if (!(bp->flags & BNX2_FLAG_AER_ENABLED))
return result;

err = pci_cleanup_aer_uncorrect_error_status(pdev);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/bnx2.h
Original file line number Diff line number Diff line change
Expand Up @@ -6741,6 +6741,7 @@ struct bnx2 {
#define BNX2_FLAG_JUMBO_BROKEN 0x00000800
#define BNX2_FLAG_CAN_KEEP_VLAN 0x00001000
#define BNX2_FLAG_BROKEN_STATS 0x00002000
#define BNX2_FLAG_AER_ENABLED 0x00004000

struct bnx2_napi bnx2_napi[BNX2_MAX_MSIX_VEC];

Expand Down

0 comments on commit 063c9d8

Please sign in to comment.