9
0
Fork 0

net: fec_imx: mask mii register reads correctly

mii registers are 16bit wide, so mask out the higher bits.
The higher bits confuse mii-tool.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2014-05-20 10:11:35 +02:00
parent 50147cd34d
commit d4f202f30e
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ static int fec_miibus_read(struct mii_bus *bus, int phyAddr, int regAddr)
/*
* it's now safe to read the PHY's register
*/
return readl(fec->regs + FEC_MII_DATA);
return readl(fec->regs + FEC_MII_DATA) & 0xffff;
}
static int fec_miibus_write(struct mii_bus *bus, int phyAddr,