public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Danny Gale <Daniel.Gale@coloradoengineeringinc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] MDIO_DEVAD_NONE
Date: Thu, 31 Jul 2014 20:15:47 -0600	[thread overview]
Message-ID: <53DAF853.9080308@coloradoengineeringinc.com> (raw)

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

                 reply	other threads:[~2014-08-01  2:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53DAF853.9080308@coloradoengineeringinc.com \
    --to=daniel.gale@coloradoengineeringinc.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox