netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/6] [BNX2]: Fix remote PHY initial link state.
@ 2008-04-30 22:51 Michael Chan
  2008-05-02 23:58 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2008-04-30 22:51 UTC (permalink / raw)
  To: davem, netdev; +Cc: benli, andy

[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 <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
---
 drivers/net/bnx2.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 284dda2..9c6f21f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -4214,13 +4214,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);
@@ -4877,6 +4870,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;
 }
-- 
1.5.5.GIT




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/6] [BNX2]: Fix remote PHY initial link state.
  2008-04-30 22:51 [PATCH 2/6] [BNX2]: Fix remote PHY initial link state Michael Chan
@ 2008-05-02 23:58 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-05-02 23:58 UTC (permalink / raw)
  To: mchan; +Cc: netdev, benli, andy

From: "Michael Chan" <mchan@broadcom.com>
Date: Wed, 30 Apr 2008 15:51:01 -0700

> [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 <mchan@broadcom.com>
> Signed-off-by: Benjamin Li <benli@broadcom.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-02 23:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 22:51 [PATCH 2/6] [BNX2]: Fix remote PHY initial link state Michael Chan
2008-05-02 23:58 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).