aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c8
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 14a778433522..82f2e963782b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -10034,8 +10034,12 @@ static void bnx2x_get_common_hwinfo(struct bnx2x *bp)
10034 id = ((val & 0xffff) << 16); 10034 id = ((val & 0xffff) << 16);
10035 val = REG_RD(bp, MISC_REG_CHIP_REV); 10035 val = REG_RD(bp, MISC_REG_CHIP_REV);
10036 id |= ((val & 0xf) << 12); 10036 id |= ((val & 0xf) << 12);
10037 val = REG_RD(bp, MISC_REG_CHIP_METAL); 10037
10038 id |= ((val & 0xff) << 4); 10038 /* Metal is read from PCI regs, but we can't access >=0x400 from
10039 * the configuration space (so we need to reg_rd)
10040 */
10041 val = REG_RD(bp, PCICFG_OFFSET + PCI_ID_VAL3);
10042 id |= (((val >> 24) & 0xf) << 4);
10039 val = REG_RD(bp, MISC_REG_BOND_ID); 10043 val = REG_RD(bp, MISC_REG_BOND_ID);
10040 id |= (val & 0xf); 10044 id |= (val & 0xf);
10041 bp->common.chip_id = id; 10045 bp->common.chip_id = id;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
index 791eb2d53011..d22bc40091ec 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
@@ -1491,10 +1491,6 @@
1491/* [R 4] This field indicates the type of the device. '0' - 2 Ports; '1' - 1 1491/* [R 4] This field indicates the type of the device. '0' - 2 Ports; '1' - 1
1492 Port. */ 1492 Port. */
1493#define MISC_REG_BOND_ID 0xa400 1493#define MISC_REG_BOND_ID 0xa400
1494/* [R 8] These bits indicate the metal revision of the chip. This value
1495 starts at 0x00 for each all-layer tape-out and increments by one for each
1496 tape-out. */
1497#define MISC_REG_CHIP_METAL 0xa404
1498/* [R 16] These bits indicate the part number for the chip. */ 1494/* [R 16] These bits indicate the part number for the chip. */
1499#define MISC_REG_CHIP_NUM 0xa408 1495#define MISC_REG_CHIP_NUM 0xa408
1500/* [R 4] These bits indicate the base revision of the chip. This value 1496/* [R 4] These bits indicate the base revision of the chip. This value
@@ -6331,6 +6327,8 @@
6331#define PCI_PM_DATA_B 0x414 6327#define PCI_PM_DATA_B 0x414
6332#define PCI_ID_VAL1 0x434 6328#define PCI_ID_VAL1 0x434
6333#define PCI_ID_VAL2 0x438 6329#define PCI_ID_VAL2 0x438
6330#define PCI_ID_VAL3 0x43c
6331
6334#define GRC_CONFIG_REG_PF_INIT_VF 0x624 6332#define GRC_CONFIG_REG_PF_INIT_VF 0x624
6335#define GRC_CR_PF_INIT_VF_PF_FIRST_VF_NUM_MASK 0xf 6333#define GRC_CR_PF_INIT_VF_PF_FIRST_VF_NUM_MASK 0xf
6336/* First VF_NUM for PF is encoded in this register. 6334/* First VF_NUM for PF is encoded in this register.