Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ganesan Ramalingam and committed by
Greg Kroah-Hartman
e1a083be b9add4c3

+1 -1
+1 -1
drivers/staging/netlogic/xlr_net.c
··· 775 775 xlr_nae_wreg(priv->gpio_addr, 0x21, 0x7104); 776 776 777 777 /* enable autoneg - more magic */ 778 - phy = priv->port_id % 4 + 27; 778 + phy = priv->phy_addr % 4 + 27; 779 779 xlr_phy_write(priv->pcs_addr, phy, 0, 0x1000); 780 780 xlr_phy_write(priv->pcs_addr, phy, 0, 0x0200); 781 781 }