From: Ganesan Ramalingam <ganesanr@xxxxxxxxxxxx> SGMII PHY address calculation should be based on phy_addr of priv data Signed-off-by: Ganesan Ramalingam <ganesanr@xxxxxxxxxxxx> --- drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 69ae8b6..6d7a6a7 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -776,7 +776,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); } -- 1.7.9.5