Message ID | 20091130.214811.233690337.davem@davemloft.net |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
On Tuesday 01 December 2009, David Miller wrote: > From: Patrick Finnegan <pat@computer-refuge.org> > Date: Mon, 30 Nov 2009 23:04:31 -0500 > > > I re-ran prtconf -pv under the 2.6.32-rc3 from your sparc git tree, > > and have the output here (it looks like it has what you're looking > > for): > > > > http://ned.cc.purdue.edu/prtconf-v880 > > Linus's tree has the fix, via my net-2.6 tree, so if you use a pure > sparc-2.6 tree you won't have it. Ok. this looks like it fixes the problem with the fiber-port gem, but the 10/100 TP gem just bounces back and forth between these messages, and never gets link: [ 174.260495] eth0: switching to forced 10bt [ 194.660290] eth0: switching to forced 100bt Ideas? It does this even with the interface not configured (down according to ifconfig), which is kinda annoying on the console... I have to do an "ethtool -s eth0 autoneg off" to make it stop. Pat
From: Patrick Finnegan <pat@computer-refuge.org> Date: Thu, 3 Dec 2009 01:48:12 -0500 > Ok. this looks like it fixes the problem with the fiber-port gem, but > the 10/100 TP gem just bounces back and forth between these messages, > and never gets link: > > [ 174.260495] eth0: switching to forced 10bt > [ 194.660290] eth0: switching to forced 100bt > > Ideas? It does this even with the interface not configured (down > according to ifconfig), which is kinda annoying on the console... I have > to do an "ethtool -s eth0 autoneg off" to make it stop. This is a feature. It tries different possibilities trying to get a link going. I'm not to thrilled about it and it is different from how other network drivers behave. I'll try to find some time to take a look at this, thanks for the report Patrick. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 305ec3d..1927b3d 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c @@ -2062,7 +2062,15 @@ static int gem_check_invariants(struct gem *gp) mif_cfg &= ~MIF_CFG_PSELECT; writel(mif_cfg, gp->regs + MIF_CFG); } else { - gp->phy_type = phy_serialink; +#ifdef CONFIG_SPARC + const char *p; + + p = of_get_property(gp->of_node, "shared-pins", NULL); + if (p && !strcmp(p, "serdes")) + gp->phy_type = phy_serdes; + else +#endif + gp->phy_type = phy_serialink; } if (gp->phy_type == phy_mii_mdio1 || gp->phy_type == phy_mii_mdio0) {