From: Andrew Lunn <andrew@lunn.ch>
To: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: netdev@vger.kernel.org, gabriel.fernandez@linaro.org,
afaerber@suse.de, fschaefer.oss@googlemail.com,
dinh.linux@gmail.com, davem@davemloft.net
Subject: Re: [PATCH (net.git) 2/2] stmmac: fix MDIO settings
Date: Wed, 9 Mar 2016 15:39:27 +0100 [thread overview]
Message-ID: <20160309143927.GD31963@lunn.ch> (raw)
In-Reply-To: <1457514007-32333-3-git-send-email-peppe.cavallaro@st.com>
On Wed, Mar 09, 2016 at 10:00:07AM +0100, Giuseppe Cavallaro wrote:
> Initially the phy_bus_name was added to manipulate the
> driver name but It was recently just used to manage the
> fixed-link and then to take some decision at run-time
> inside the main (for example to skip EEE).
>
> So the patch now introduces a new platforms boolean to
> manage that and removes the phy_bus_name variable not
> necessary anymore.
>
> The driver can manage the mdio registration by using phy-handle,
> dwmac-mdio and own parameter e.g. snps,phy-addr.
> This patch takes care about all these possible configurations
> and fixes the mdio registration in case of there is a real
> transceiver or a switch (that needs to be managed by using
> fixed-link).
>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: Gabriel Fernandez <gabriel.fernandez@linaro.org>
> Cc: Andreas Färber <afaerber@suse.de>
> Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
> Cc: Dinh Nguyen <dinh.linux@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +++--------
> .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 15 ++++++---------
> include/linux/stmmac.h | 2 +-
> 3 files changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c21015b..87e4643 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -271,7 +271,6 @@ static void stmmac_eee_ctrl_timer(unsigned long arg)
> */
> bool stmmac_eee_init(struct stmmac_priv *priv)
> {
> - char *phy_bus_name = priv->plat->phy_bus_name;
> unsigned long flags;
> bool ret = false;
>
> @@ -283,7 +282,7 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
> goto out;
>
> /* Never init EEE in case of a switch is attached */
> - if (phy_bus_name && (!strcmp(phy_bus_name, "fixed")))
> + if (priv->plat->is_fixed_link)
> goto out;
Hi Giuseppe
The phydev itself has a bool is_pseudo_fixed_link. You might be able
to use this instead of adding your own.
Andrew
next prev parent reply other threads:[~2016-03-09 14:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 9:00 [PATCH (net.git) 0/2] stmmac: MDIO fixes Giuseppe Cavallaro
2016-03-09 9:00 ` [PATCH (net.git) 1/2] Revert "stmmac: Fix 'eth0: No PHY found' regression" Giuseppe Cavallaro
2016-03-09 9:00 ` [PATCH (net.git) 2/2] stmmac: fix MDIO settings Giuseppe Cavallaro
2016-03-09 10:27 ` Gabriel Fernandez
2016-03-09 10:39 ` Giuseppe CAVALLARO
2016-03-09 14:39 ` Andrew Lunn [this message]
2016-03-09 18:20 ` [PATCH (net.git) 0/2] stmmac: MDIO fixes Frank Schäfer
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=20160309143927.GD31963@lunn.ch \
--to=andrew@lunn.ch \
--cc=afaerber@suse.de \
--cc=davem@davemloft.net \
--cc=dinh.linux@gmail.com \
--cc=fschaefer.oss@googlemail.com \
--cc=gabriel.fernandez@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/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).