public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] MDIO_DEVAD_NONE
@ 2014-08-01  2:15 Danny Gale
  0 siblings, 0 replies; only message in thread
From: Danny Gale @ 2014-08-01  2:15 UTC (permalink / raw)
  To: u-boot

Hi all,

We are working on porting u-boot to a new board based around the 
Freescale T4240. We also have a 10G BASE-T PHY on board. We're running 
into some difficulty bringing up the XFI XGMII interface between the 
T4240 and the PHY and verifying that it's set up correctly.

One of the things I've noticed is that the genphy functions use 
MDIO_DEVAD_NONE, which is defined as -1 (0xFFFF as an int). When 
truncated to 5 bits for an MDIO device address, that's 0x1F. That's not 
generally a valid MDIO device address, is it?

Reads from this device address, like the one below from 
genphy_update_link in drivers/net/phy/phy.c:216, return 0xFFFF since the 
bus is pulled up and there's no driving source in the PHY:

     mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);

So, in this case, genphy_update_link will falsely report that the link 
is up if there's no device at the 0x1F MDIO device address.

Is this the intended behavior?

Thanks,
Danny

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-01  2:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01  2:15 [U-Boot] MDIO_DEVAD_NONE Danny Gale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox