From: Ben Hutchings <bhutchings@solarflare.com>
To: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/4] net: ethtool: add the EEE support
Date: Tue, 28 Feb 2012 15:45:00 +0000 [thread overview]
Message-ID: <1330443900.8460.158.camel@deadeye> (raw)
In-Reply-To: <1330433084-18586-3-git-send-email-peppe.cavallaro@st.com>
On Tue, 2012-02-28 at 13:44 +0100, Giuseppe CAVALLARO wrote:
> This patch adds two new functions to detect if Energy-Efficient
> Ethernet (EEE) is supported and the way to enable/disable it.
>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
> include/linux/ethtool.h | 7 +++++++
> net/core/ethtool.c | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index da5b2de..fdea3c7 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -43,6 +43,7 @@ struct ethtool_cmd {
> __u8 eth_tp_mdix;
> __u8 reserved2;
> __u32 lp_advertising; /* Features the link partner advertises */
> + __u32 eee; /* Energy-Efficient Etehrnet */
> __u32 reserved[2];
> };
You can't change the size of this structure.
> @@ -874,6 +875,8 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
> * and flag of the device.
> * @get_dump_data: Get dump data.
> * @set_dump: Set dump specific flags to the device.
> + * @get_eee: Get Energy-Efficient Ethernet (EEE) supported and status.
> + * @set_eee: Set EEE status (enable/disable).
> *
> * All operations are optional (i.e. the function pointer may be set
> * to %NULL) and callers must take this into account. Callers must
> @@ -937,6 +940,8 @@ struct ethtool_ops {
> struct ethtool_dump *, void *);
> int (*set_dump)(struct net_device *, struct ethtool_dump *);
>
> + int (*get_eee) (struct net_device *, struct ethtool_value *);
> + int (*set_eee) (struct net_device *, struct ethtool_value *);
[...]
Why are there new operations as well as a new field to ethtool_cmd?
Is the value a boolean or a bitmask?
Since EEE is an auto-negotiated feature, why aren't you defining flags
for the supported/advertising/lp_advertising fields?
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-02-28 15:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-28 12:44 [PATCH 0/4 (net.git)] stmmac EEE support Giuseppe CAVALLARO
2012-02-28 12:44 ` [PATCH 1/4] phy: add the EEE support and the way to access to the MMD regs Giuseppe CAVALLARO
2012-02-28 12:44 ` [PATCH 2/4] net: ethtool: add the EEE support Giuseppe CAVALLARO
2012-02-28 15:45 ` Ben Hutchings [this message]
2012-02-29 16:12 ` Giuseppe CAVALLARO
2012-02-29 17:00 ` Ben Hutchings
2012-02-28 12:44 ` [PATCH 3/4] stmmac: update the driver Documentation and add EEE Giuseppe CAVALLARO
2012-02-28 12:44 ` [PATCH 4/4] stmmac: add the Energy Efficient Ethernet support Giuseppe CAVALLARO
2012-02-28 12:46 ` [PATCH] ethtool: add the EEE option Giuseppe CAVALLARO
2012-02-28 20:18 ` [PATCH 0/4 (net.git)] stmmac EEE support David Miller
2012-02-29 16:07 ` Giuseppe CAVALLARO
2012-03-06 8:28 ` [net-next 0/4] stmmac: add the " Giuseppe CAVALLARO
2012-03-06 8:28 ` [net-next 1/4] phy: add the EEE support and the way to access to the MMD regs Giuseppe CAVALLARO
2012-03-06 16:55 ` Ben Hutchings
2012-03-06 17:05 ` Ben Hutchings
2012-03-08 14:54 ` Giuseppe CAVALLARO
2012-03-08 18:29 ` Ben Hutchings
2012-03-09 14:39 ` Giuseppe CAVALLARO
2012-03-06 8:28 ` [net-next 2/4] net: ethtool: add the EEE support Giuseppe CAVALLARO
2012-03-06 16:56 ` Ben Hutchings
2012-03-08 15:14 ` Giuseppe CAVALLARO
2012-03-06 8:28 ` [net-next 3/4] stmmac: update the driver Documentation and add EEE Giuseppe CAVALLARO
2012-03-06 8:28 ` [net-next 4/4] stmmac: add the Energy Efficient Ethernet support Giuseppe CAVALLARO
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=1330443900.8460.158.camel@deadeye \
--to=bhutchings@solarflare.com \
--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).