From: Andrew Lunn <andrew@lunn.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
netdev@vger.kernel.org,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] of: mdio: Support fixed links in of_phy_get_and_connect()
Date: Wed, 11 Jul 2018 22:04:52 +0200 [thread overview]
Message-ID: <20180711200452.GD21430@lunn.ch> (raw)
In-Reply-To: <20180711174511.15308-1-linus.walleij@linaro.org>
On Wed, Jul 11, 2018 at 07:45:11PM +0200, Linus Walleij wrote:
> By a simple extension of of_phy_get_and_connect() drivers
> that have a fixed link on e.g. RGMII can support also
> fixed links, so in addition to:
>
> ethernet-port {
> phy-mode = "rgmii";
> phy-handle = <&foo>;
> };
>
> This setup with a fixed-link node and no phy-handle will
> now also work just fine:
>
> ethernet-port {
> phy-mode = "rgmii";
> fixed-link {
> speed = <1000>;
> full-duplex;
> pause;
> };
> };
>
> This is very helpful for connecting random ethernet ports
> to e.g. DSA switches that typically reside on fixed links.
>
> The phy-mode is still there as the fixes link in this case
> is still an RGMII link.
>
> Tested on the Cortina Gemini driver with the Vitesse DSA
> router chip on a fixed 1Gbit link.
>
> Suggested-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
What probably make sense as a followup is add a
of_phy_disconnect_and_put(). When the module is unloaded, you leak a
fixed link, because of_phy_deregister_fixed_link() is not being
called. You also hold a reference to np which does not appear to be
released.
Andrew
next prev parent reply other threads:[~2018-07-11 20:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 17:45 [PATCH] of: mdio: Support fixed links in of_phy_get_and_connect() Linus Walleij
2018-07-11 20:04 ` Andrew Lunn [this message]
2018-08-12 11:54 ` Linus Walleij
2018-08-12 17:24 ` Andrew Lunn
2018-07-14 1:25 ` David Miller
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=20180711200452.GD21430@lunn.ch \
--to=andrew@lunn.ch \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linus.walleij@linaro.org \
--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.