From: Michael Chan Date: Fri, 2 May 2008 23:56:44 +0000 (-0700) Subject: bnx2: Fix remote PHY initial link state. X-Git-Tag: v2.6.26-rc1~5^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=543a827d7a5600a71855bd6afacac78536c86822;p=linux-2.6 bnx2: Fix remote PHY initial link state. On some remote PHY blade systems, the driver receives no initial link interrupt. As a result, the GMII/MII MAC mode does not get setup properly. To fix this problem, we add an initial poll of the link state after chip reset. With this change, the setting of the initial carrier state in the init code can be eliminated. Signed-off-by: Michael Chan Signed-off-by: Benjamin Li Signed-off-by: David S. Miller --- diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 506c5ccd71..d681f3153e 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -4216,13 +4216,6 @@ bnx2_init_remote_phy(struct bnx2 *bp) if (netif_running(bp->dev)) { u32 sig; - if (val & BNX2_LINK_STATUS_LINK_UP) { - bp->link_up = 1; - netif_carrier_on(bp->dev); - } else { - bp->link_up = 0; - netif_carrier_off(bp->dev); - } sig = BNX2_DRV_ACK_CAP_SIGNATURE | BNX2_FW_CAP_REMOTE_PHY_CAPABLE; bnx2_shmem_wr(bp, BNX2_DRV_ACK_CAP_MB, sig); @@ -4879,6 +4872,8 @@ bnx2_init_nic(struct bnx2 *bp) spin_lock_bh(&bp->phy_lock); bnx2_init_phy(bp); bnx2_set_link(bp); + if (bp->phy_flags & BNX2_PHY_FLAG_REMOTE_PHY_CAP) + bnx2_remote_phy_event(bp); spin_unlock_bh(&bp->phy_lock); return 0; }