From: Ganesan Ramalingam Date: Thu, 21 Aug 2014 14:21:23 +0000 (+0530) Subject: Staging: Netlogic: PHY address calculation fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e1a083be73b4b5ac5481eb8104476ae7b386896d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Staging: Netlogic: PHY address calculation fix SGMII PHY address calculation should be based on phy_addr of priv data Signed-off-by: Ganesan Ramalingam Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 469f75f0f818..a2c03390e47e 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -775,7 +775,7 @@ static void xlr_sgmii_init(struct xlr_net_priv *priv) xlr_nae_wreg(priv->gpio_addr, 0x21, 0x7104); /* enable autoneg - more magic */ - phy = priv->port_id % 4 + 27; + phy = priv->phy_addr % 4 + 27; xlr_phy_write(priv->pcs_addr, phy, 0, 0x1000); xlr_phy_write(priv->pcs_addr, phy, 0, 0x0200); }