Staging: Netlogic: PHY address calculation fix
authorGanesan Ramalingam <ganesanr@broadcom.com>
Thu, 21 Aug 2014 14:21:23 +0000 (19:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 21:00:11 +0000 (14:00 -0700)
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>
drivers/staging/netlogic/xlr_net.c

index 469f75f0f8186153da1a8229e6c8167587586bf9..a2c03390e47e3241648007f58e20ec65e71c4736 100644 (file)
@@ -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);
 }