From: David S. Miller Date: Tue, 17 Nov 2009 12:46:18 +0000 (-0800) Subject: sungem: Fix Serdes detection. X-Git-Tag: firefly_0821_release~11864^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e54d5512b600aa0d492010436ff7eb0c9194efc1;p=firefly-linux-kernel-4.4.55.git sungem: Fix Serdes detection. We need to look for the 'shared-pins' property to get this right. Based upon a patch by Hermann Lauer. Signed-off-by: David S. Miller --- diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 305ec3d783db..1927b3de9eec 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) {