diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2013-03-11 05:17:43 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-12 07:54:22 -0400 |
commit | f22fdf25f4d4e9a2124ca6a2521f36dd73a32dad (patch) | |
tree | 24c78876f3c0ad0e8b13098551522d628ba6b78f /drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |
parent | 005a07baa1713861a060fab66a3d7d91f8d759c6 (diff) | |
download | op-kernel-dev-f22fdf25f4d4e9a2124ca6a2521f36dd73a32dad.zip op-kernel-dev-f22fdf25f4d4e9a2124ca6a2521f36dd73a32dad.tar.gz |
bnx2x: Take chip version from MFW
In latest boards, the CHIP_METAL register contains an incorrect
revision value, so the correct one needs to be obtained in a
different manner.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 14a7784..82f2e96 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) id = ((val & 0xffff) << 16); val = REG_RD(bp, MISC_REG_CHIP_REV); id |= ((val & 0xf) << 12); - val = REG_RD(bp, MISC_REG_CHIP_METAL); - id |= ((val & 0xff) << 4); + + /* Metal is read from PCI regs, but we can't access >=0x400 from + * the configuration space (so we need to reg_rd) + */ + val = REG_RD(bp, PCICFG_OFFSET + PCI_ID_VAL3); + id |= (((val >> 24) & 0xf) << 4); val = REG_RD(bp, MISC_REG_BOND_ID); id |= (val & 0xf); bp->common.chip_id = id; |