Current driver masking the status register value with the speed
mask to get the duplex mode which is wrong and it overwrites the
full duplex status bit. This patch fixes the logic.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Reviewed-by: Kedareswara rao Appana <appanad@xilinx.com>
if (AUTONEG_ENABLE == phydev->autoneg) {
status = phy_read(phydev, MII_LPA);
- status = status & MII_PHY_STATUS_SPD_MASK;
if (status & MII_PHY_STATUS_FULLDUPLEX)
phydev->duplex = DUPLEX_FULL;
else
phydev->duplex = DUPLEX_HALF;
- switch (status) {
+ switch (status & MII_PHY_STATUS_SPD_MASK) {
case MII_PHY_STATUS_1000:
phydev->speed = SPEED_1000;
break;