net: phy: broadcom: Fix auxiliary control register reads
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 22 May 2018 23:22:26 +0000 (16:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2018 20:49:21 +0000 (22:49 +0200)
commit900679988fdf24d687c746e909b10e47e442ad05
tree5a14cb3571fad9fb96d9335c6cb7a310362c2b8b
parent8d80a839c1793f2237b91df59a5c46d4b02e7eda
net: phy: broadcom: Fix auxiliary control register reads

[ Upstream commit 733a969a7ed14fc5786bcc59c1bdda83c7ddb46e ]

We are currently doing auxiliary control register reads with the shadow
register value 0b111 (0x7) which incidentally is also the selector value
that should be present in bits [2:0]. Fix this by using the appropriate
selector mask which is defined (MII_BCM54XX_AUXCTL_SHDWSEL_MASK).

This does not have a functional impact yet because we always access the
MII_BCM54XX_AUXCTL_SHDWSEL_MISC (0x7) register in the current code.
This might change at some point though.

Fixes: 5b4e29005123 ("net: phy: broadcom: add bcm54xx_auxctl_read")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/bcm-phy-lib.c