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:
parent
50147cd34d
commit
d4f202f30e
|
@ -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
|
* 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,
|
static int fec_miibus_write(struct mii_bus *bus, int phyAddr,
|
||||||
|
|
Loading…
Reference in New Issue