Staging: Netlogic: PHY address calculation fix

SGMII PHY address calculation should be based on phy_addr of priv data

Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ganesan Ramalingam 2014-08-21 19:51:23 +05:30 committed by Greg Kroah-Hartman
parent b9add4c3a3
commit e1a083be73
1 changed files with 1 additions and 1 deletions

View File

@ -775,7 +775,7 @@ static void xlr_sgmii_init(struct xlr_net_priv *priv)
xlr_nae_wreg(priv->gpio_addr, 0x21, 0x7104); xlr_nae_wreg(priv->gpio_addr, 0x21, 0x7104);
/* enable autoneg - more magic */ /* 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, 0x1000);
xlr_phy_write(priv->pcs_addr, phy, 0, 0x0200); xlr_phy_write(priv->pcs_addr, phy, 0, 0x0200);
} }