Message ID | 20091117.044928.245588641.davem@davemloft.net |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
On Tue, Nov 17, 2009 at 04:49:28AM -0800, David Miller wrote: > It seems there is a special device property that we can use > to detect this properly. > > Please try the attached patch on your system, it should fix > the problem too. Works on the SunFire 880 with internel fibre serdes and on a SunFire 480 with a PCI Card with fibre serdes here. On the PCI card interrestingly there were initially type phy_mii_mdio1 or phy_mii_mdio0 detected and only after failing to read the phy_mii fall back to type phy_serdes. The 'shared-pins' property would be available for testing for a serdes on that card, too. But anyways, all interfaces are working. Thanks. BTW, are there any new ideas about getting post 2.6.26 kernels booting on that class of sparc machines ? My last try with 2.6.31.6 still hangs at the usual point. Anything I could/should try ? The offer of remote debugging on the SunFire 480 still stands, if you could find a few spare minutes... Thanks, Hermann
From: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de> Date: Fri, 20 Nov 2009 15:28:03 +0100 > Works on the SunFire 880 with internel fibre serdes and on a SunFire 480 > with a PCI Card with fibre serdes here. > > On the PCI card interrestingly there were initially type phy_mii_mdio1 > or phy_mii_mdio0 detected and only after failing to read the phy_mii > fall back to type phy_serdes. The 'shared-pins' property would be > available for testing for a serdes on that card, too. Yes, it seems we could sample that shared-pins property for all PHY types, not just for handling the serdes case. > But anyways, all interfaces are working. Thanks. Thanks for testing. > BTW, are there any new ideas about getting post 2.6.26 kernels booting > on that class of sparc machines ? My last try with 2.6.31.6 still > hangs at the usual point. Anything I could/should try ? > > The offer of remote debugging on the SunFire 480 still stands, > if you could find a few spare minutes... Sorry for not getting to this, I'll make a special effort to do so soon. -- 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) {