public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Petr Kulhavy <petr@barix•com>
Cc: netdev@vger•kernel.org
Subject: Re: davinci-mdio: failing to connect to PHY
Date: Mon, 4 Apr 2016 14:31:45 +0200	[thread overview]
Message-ID: <20160404123145.GE21828@lunn.ch> (raw)
In-Reply-To: <57022356.6010309@barix.com>

On Mon, Apr 04, 2016 at 10:18:30AM +0200, Petr Kulhavy wrote:
> Hi,
> 
> I'm experiencing a peculiar problem with PHY communication in the
> current davinci-mdio.c driver.
> After upgrading from kernel 3.17 to 4.5 my DT based AM1808 board
> started having issues with the PHY communication.
> The MAC is detected, the MDIO is detected, the PHY is detected
> (twice?!?!), however there is no data being sent/received and the
> after issuing "ifdown -a" the MDIO starts spitting out messages that
> it cannot connect to the PHY:
> 
> net eth0: could not connect to phy davinci_mdio.0:00
> davinci_mdio davinci_mdio.0: resetting idled controller
> 
> 
> I'm using a single Micrel KSZ8081 PHY connected via RMII using the
> default PHY address 0x01.
> Here is the dmesg excerpt related to mdio:
> 
> davinci_mdio davinci_mdio.0: Runtime PM disabled, clock forced on.
> davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
> davinci_mdio davinci_mdio.0: detected phy mask fffffffc
> libphy: davinci_mdio.0: probed
> davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio.0:00,
> driver Micrel KSZ8081 or KSZ8091
> davinci_mdio davinci_mdio.0: phy[1]: device davinci_mdio.0:01,
> driver Micrel KSZ8081 or KSZ8091
> davinci_mdio davinci_mdio.0: resetting idled controller
> Micrel KSZ8081 or KSZ8091 davinci_mdio.0:00: failed to disable NAND
> tree mode
> Micrel KSZ8081 or KSZ8091 davinci_mdio.0:00: attached PHY driver
> [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=davinci_mdio.0:00,
> irq=-1)
> 
> 
> After a soft-reboot the MDIO uses a different PHY mask fffffffd,
> detects correctly only one PHY at address 1 (this is the default
> address) and the networking works:
 
Hi Petr

You might want to take a look at:

http://lxr.free-electrons.com/source/drivers/net/ethernet/ti/davinci_mdio.c#L137

It seems to be asking the hardware about the phy mask.

   Andrew

  reply	other threads:[~2016-04-04 12:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04  8:18 davinci-mdio: failing to connect to PHY Petr Kulhavy
2016-04-04 12:31 ` Andrew Lunn [this message]
2016-04-04 13:50   ` Petr Kulhavy
2016-04-04 13:58     ` Andrew Lunn
2016-04-04 14:01       ` Petr Kulhavy
  -- strict thread matches above, loose matches on Subject: below --
2016-04-01 15:24 Petr Kulhavy

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=20160404123145.GE21828@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=petr@barix$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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