[BNX2]: Disable parallel detect on an HP blade.

Because of some board issues, we need to disable parallel detect on
an HP blade. Without this patch, the link state can become stuck
when it goes into parallel detect mode.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Michael Chan and committed by David S. Miller 38ea3686 a2724e25

+14 -1
+13 -1
drivers/net/bnx2.c
··· 5362 5362 return -ENODEV; 5363 5363 } 5364 5364 5365 + /* Determining link for parallel detection. */ 5365 5366 static int 5366 5367 bnx2_5706_serdes_has_link(struct bnx2 *bp) 5367 5368 { 5368 5369 u32 mode_ctl, an_dbg, exp; 5370 + 5371 + if (bp->phy_flags & BNX2_PHY_FLAG_NO_PARALLEL) 5372 + return 0; 5369 5373 5370 5374 bnx2_write_phy(bp, MII_BNX2_MISC_SHADOW, MISC_SHDW_MODE_CTL); 5371 5375 bnx2_read_phy(bp, MII_BNX2_MISC_SHADOW, &mode_ctl); ··· 7332 7328 bp->flags |= BNX2_FLAG_NO_WOL; 7333 7329 bp->wol = 0; 7334 7330 } 7335 - if (CHIP_NUM(bp) != CHIP_NUM_5706) { 7331 + if (CHIP_NUM(bp) == CHIP_NUM_5706) { 7332 + /* Don't do parallel detect on this board because of 7333 + * some board problems. The link will not go down 7334 + * if we do parallel detect. 7335 + */ 7336 + if (pdev->subsystem_vendor == PCI_VENDOR_ID_HP && 7337 + pdev->subsystem_device == 0x310c) 7338 + bp->phy_flags |= BNX2_PHY_FLAG_NO_PARALLEL; 7339 + } else { 7336 7340 bp->phy_addr = 2; 7337 7341 if (reg & BNX2_SHARED_HW_CFG_PHY_2_5G) 7338 7342 bp->phy_flags |= BNX2_PHY_FLAG_2_5G_CAPABLE;
+1
drivers/net/bnx2.h
··· 6673 6673 #define BNX2_PHY_FLAG_DIS_EARLY_DAC 0x00000400 6674 6674 #define BNX2_PHY_FLAG_REMOTE_PHY_CAP 0x00000800 6675 6675 #define BNX2_PHY_FLAG_FORCED_DOWN 0x00001000 6676 + #define BNX2_PHY_FLAG_NO_PARALLEL 0x00002000 6676 6677 6677 6678 u32 mii_bmcr; 6678 6679 u32 mii_bmsr;