netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Frantisek Rysanek <Frantisek.Rysanek@post.cz>
Cc: netdev@vger.kernel.org
Subject: Re: HW question: i210 vs. BCM5461S over SGMII: no response from PHY to MDIO requests?
Date: Wed, 21 Mar 2018 14:08:09 +0100	[thread overview]
Message-ID: <20180321130809.GB11206@lunn.ch> (raw)
In-Reply-To: <5AB23844.22609.48A1E06C@Frantisek.Rysanek.post.cz>

> Looking at the i2c dumps, and some past dumps from the igb driver, 
> it's dawning on me on me that the igb driver, without much hacking, 
> would try to read the PHY ID from the DMI/DDM block - a case which 
> the drivers/net/phy/mdio-i2c.c specifically avoids :-)

It avoids if for a very good reason. This driver exports a standard
Linux MDIO bus. The core phylib code will then probe the bus, read the
IDs, find the correct PHY driver and loads it.

It is probably good that you spend some time looking at a driver other
than igb. Picking one i know a little, say the Freescale FEC. It has
functions to perform MDIO read and MDIO write. These are then exported
as an MDIO bus to the linux common code. And there are a few calls to
phy_connect(), phy_start(), phy_stop(). That is how you build a driver
which uses the code in drivers/net/phy. mvneta shows how you can use
phylink. Study these two far a while.

      Andrew

  reply	other threads:[~2018-03-21 13:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-17 22:12 HW question: i210 vs. BCM5461S over SGMII: no response from PHY to MDIO requests? Frantisek Rysanek
2018-03-18 14:40 ` Andrew Lunn
2018-03-20  9:02   ` Frantisek Rysanek
2018-03-20 12:09     ` Andrew Lunn
2018-03-20 12:23       ` Frantisek Rysanek
2018-03-21 10:47       ` Frantisek Rysanek
2018-03-21 13:08         ` Andrew Lunn [this message]
2018-03-20 12:02   ` Frantisek Rysanek
  -- strict thread matches above, loose matches on Subject: below --
2018-03-21 11:50 Frantisek Rysanek
2018-03-21 12:58 ` Andrew Lunn
2018-03-21 14:07   ` Frantisek Rysanek
2018-03-16 16:48 Frantisek Rysanek
2018-03-16 18:42 ` Andrew Lunn
2018-03-16 20:40   ` Frantisek Rysanek
2018-03-16 21:02     ` Andrew Lunn
2018-03-17  7:39       ` Frantisek Rysanek
2018-03-17 14:50         ` Andrew Lunn
2018-03-17 15:20           ` Frantisek Rysanek

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=20180321130809.GB11206@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Frantisek.Rysanek@post.cz \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).