Subject: [PATCH 3/3] sky2: avoid duplicate link up on Optima chip

From: Stephen Hemminger <[email-masked]>
Date: Mon, 29 Mar 2010 10:36:20 -0700

The Optima version has feature to detect link quickly without PHY interrupt,
but it causes duplicate link up events.

Signed-off-by: Stephen Hemminger <[email-masked]>

--- a/drivers/net/sky2.c	2010-03-29 10:29:17.530956219 -0700
+++ b/drivers/net/sky2.c	2010-03-29 10:29:18.261894374 -0700
@@ -2146,7 +2146,8 @@ static void sky2_phy_intr(struct sky2_hw
 		   istatus, phystat);
 
 	if (istatus & PHY_M_IS_AN_COMPL) {
-		if (sky2_autoneg_done(sky2, phystat) == 0)
+		if (sky2_autoneg_done(sky2, phystat) == 0 &&
+		    !netif_carrier_ok(dev))
 			sky2_link_up(sky2);
 		goto out;
 	}

--