From: Florian Fainelli <f.fainelli@gmail.com>
To: David Thomson <david.thomson@alliedtelesis.co.nz>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: phy: Pass mdix ethtool setting through to phy driver
Date: Thu, 09 Jul 2015 19:33:08 -0700 [thread overview]
Message-ID: <559F2EE4.9050702@gmail.com> (raw)
In-Reply-To: <1436493414-16248-1-git-send-email-david.thomson@alliedtelesis.co.nz>
Le 07/09/15 18:56, David Thomson a écrit :
> Pass the mdix setting from ethtool down to the phy driver, to allow
> driver specific implementations of manually setting the polarity.
>
> Signed-off-by: David Thomson <david.thomson@alliedtelesis.co.nz>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Looking forwarding to see an user of this!
> ---
> drivers/net/phy/phy.c | 2 ++
> include/linux/phy.h | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index b2197b5..47693a9 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -353,6 +353,8 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd)
>
> phydev->duplex = cmd->duplex;
>
> + phydev->mdix = cmd->eth_tp_mdix_ctrl;
> +
> /* Restart the PHY */
> phy_start_aneg(phydev);
>
> diff --git a/include/linux/phy.h b/include/linux/phy.h
> index a26c3f8..e5fb1d4 100644
> --- a/include/linux/phy.h
> +++ b/include/linux/phy.h
> @@ -424,6 +424,8 @@ struct phy_device {
>
> struct net_device *attached_dev;
>
> + u8 mdix;
> +
> void (*adjust_link)(struct net_device *dev);
> };
> #define to_phy_device(d) container_of(d, struct phy_device, dev)
>
--
Florian
next prev parent reply other threads:[~2015-07-10 2:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 1:56 [PATCH] net: phy: Pass mdix ethtool setting through to phy driver David Thomson
2015-07-10 2:33 ` Florian Fainelli [this message]
2015-07-11 6:17 ` 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=559F2EE4.9050702@gmail.com \
--to=f.fainelli@gmail.com \
--cc=david.thomson@alliedtelesis.co.nz \
--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.