From: Phil Reid <preid@electromag.com.au>
To: netdev@vger.kernel.org
Subject: rfi: stmmac: creating an of mdio bus for attached dsa
Date: Fri, 18 Sep 2015 15:26:36 +0800 [thread overview]
Message-ID: <55FBBCAC.1080904@electromag.com.au> (raw)
G'day All,
Prior to submitting a patch I'd just like to get an idea on what the
correct way is to create and register an mdio bus for use by the marvell
dsa driver.
On our system the cpu ethernet port is connected directly to a switch
with a fixed link (1Gbit).
So the driver needs to create and persist the mdio bus for the dsa
driver using of_mdiobus_register.
The trunk stmmac driver currently doesn't create the mdio bus if a fixed
link is found.
stmmac_probe_config_dt does hte following check.
if (plat->phy_node || plat->phy_bus_name)
plat->mdio_bus_data = NULL;
phy_node is set because a fixed-link is found above and setting
mdio_bus_data to null skips mdio bus creation.
removing the phy_node check gets things working.
I've also modified stmmac_mdio_register to use of_mdiobus_register and
setup the dt to probe for a phy (that doesn't really exist, the switch
is on the mdio).
This cause a fair bit of log spamming but does seem to work as the
switch is detected.
eg: eth0: PHY ID 00000000 at 27 IRQ POLL (stmmac-0:1b)
Currently if no phy is found the mdio bus gets de registered so this
seems to be required.
In summary what is the correct way to make sure the mdio bus stays
registered when a fixed-link is in use?
Am I configuring the link to the switch incorrectly?
Phil
next reply other threads:[~2015-09-18 7:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 7:26 Phil Reid [this message]
2015-09-19 20:58 ` rfi: stmmac: creating an of mdio bus for attached dsa Florian Fainelli
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=55FBBCAC.1080904@electromag.com.au \
--to=preid@electromag.com.au \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.