Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 341739
b: refs/heads/master
c: 092a5fc
h: refs/heads/master
i:
  341737: 418c23e
  341735: c25f88e
v: v3
  • Loading branch information
Yaniv Rosner authored and David S. Miller committed Dec 3, 2012
1 parent a1a585f commit de3be2c
Show file tree
Hide file tree
Showing 3 changed files with 12 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: 64e9a9b8a0eef9cbd9f86f0e79fc4eeea24abe76
refs/heads/master: 092a5fc9636268bc2c0fef4d9b99845699cf19f9
8 changes: 8 additions & 0 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11570,6 +11570,14 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
goto err_out_disable;
}

pci_read_config_dword(pdev, PCICFG_REVISION_ID_OFFSET, &pci_cfg_dword);
if ((pci_cfg_dword & PCICFG_REVESION_ID_MASK) ==
PCICFG_REVESION_ID_ERROR_VAL) {
pr_err("PCI device error, probably due to fan failure, aborting\n");
rc = -ENODEV;
goto err_out_disable;
}

if (atomic_read(&pdev->enable_cnt) == 1) {
rc = pci_request_regions(pdev, DRV_MODULE_NAME);
if (rc) {
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -6160,7 +6160,9 @@
#define PCICFG_COMMAND_INT_DISABLE (1<<10)
#define PCICFG_COMMAND_RESERVED (0x1f<<11)
#define PCICFG_STATUS_OFFSET 0x06
#define PCICFG_REVESION_ID_OFFSET 0x08
#define PCICFG_REVISION_ID_OFFSET 0x08
#define PCICFG_REVESION_ID_MASK 0xff
#define PCICFG_REVESION_ID_ERROR_VAL 0xff
#define PCICFG_CACHE_LINE_SIZE 0x0c
#define PCICFG_LATENCY_TIMER 0x0d
#define PCICFG_BAR_1_LOW 0x10
Expand Down

0 comments on commit de3be2c

Please sign in to comment.