From: Yaniv Rosner Date: Mon, 28 Nov 2011 00:49:49 +0000 (+0000) Subject: bnx2x: Change Warpcore MDIO work around mode X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~532 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ccfe17f58714f9f54c3ca5afa34a6e34a00c5349;p=users%2Fjedix%2Flinux-maple.git bnx2x: Change Warpcore MDIO work around mode This patch enables the usage of simpler MDC/MDIO work-around when accessing Warpcore registers. (cherry picked from commit ec15b898a4a812e89a63b8e52bc11d4e84d74db1) Signed-off-by: Yaniv Rosner Signed-off-by: Eilon Greenstein Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 61ad316b29da..7fa7177fa603 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c @@ -11302,7 +11302,9 @@ static int bnx2x_populate_int_phy(struct bnx2x *bp, u32 shmem_base, u8 port, offsetof(struct shmem_region, dev_info.port_feature_config[port].link_config)) & PORT_FEATURE_CONNECTED_SWITCH_MASK); - chip_id = REG_RD(bp, MISC_REG_CHIP_NUM) << 16; + chip_id = (REG_RD(bp, MISC_REG_CHIP_NUM) << 16) | + ((REG_RD(bp, MISC_REG_CHIP_REV) & 0xf) << 12); + DP(NETIF_MSG_LINK, ":chip_id = 0x%x\n", chip_id); if (USES_WARPCORE(bp)) { u32 serdes_net_if;