From 9badba2543d165154c540b80e59ff06c1b3e3f76 Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Mon, 29 Mar 2010 07:36:20 +0000 Subject: [PATCH] sky2: avoid duplicate link up on Optima chip The Optima version has feature to detect link quickly without PHY interrupt, but it causes duplicate link up events. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/sky2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index eec36995af22..f1c0ec308bfe 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2146,7 +2146,8 @@ static void sky2_phy_intr(struct sky2_hw *hw, unsigned port) 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; } -- 2.11.0