From: Matt Carlson Date: Sat, 5 Jun 2010 17:24:35 +0000 (+0000) Subject: tg3: 5717: Allow serdes link via parallel detect X-Git-Tag: v2.6.36-rc1~571^2~639 X-Git-Url: https://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=57d8b88030ca9f295bb72ef65228c6d86bed22f6 tg3: 5717: Allow serdes link via parallel detect The 5717 serdes phy brings link up via parallel detection without any additional help from the driver. This patch changes the tg3_setup_fiber_mii_phy() function to detect and allow the use of this feature. Signed-off-by: Matt Carlson Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d169337bc7e..2dcde1343cc 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -4206,6 +4206,8 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, int force_reset) current_duplex = DUPLEX_FULL; else current_duplex = DUPLEX_HALF; + } else if (!(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) { + /* Link is up via parallel detect */ } else { current_link_up = 0; } @@ -8531,8 +8533,10 @@ static void tg3_timer(unsigned long __opaque) } tg3_setup_phy(tp, 0); } - } else if (tp->tg3_flags2 & TG3_FLG2_MII_SERDES) + } else if ((tp->tg3_flags2 & TG3_FLG2_MII_SERDES) && + !(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) { tg3_serdes_parallel_detect(tp); + } tp->timer_counter = tp->timer_multiplier; }