From: Ben Hutchings <bhutchings@solarflare.com>
To: Stuart Hodgson <smhodgson@solarflare.com>
Cc: <netdev@vger.kernel.org>, <bruce.w.allan@intel.com>,
<decot@google.com>, <alexander.h.duyck@intel.com>,
<davem@davemloft.net>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 2/3] Add capability to retrieve plug-in module EEPROM
Date: Tue, 24 Apr 2012 18:29:05 +0100 [thread overview]
Message-ID: <1335288545.17274.35.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <4F9031CE.1060702@solarflare.com>
On Thu, 2012-04-19 at 16:39 +0100, Stuart Hodgson wrote:
> Provides a new struct ethtool_modinfo that will return the
> type and size of plug-in module eeprom (such as SFP+) for parsing
> by userland program.
>
> The second provides the API to get the raw eeprom information
> using the existing ethtool_eeprom structture to return the data
>
> Signed-off-by: Stuart Hodgson <smhodgson@solarflare.com>
> ---
> include/linux/ethtool.h | 33 +++++++++++++++++++++++++++++++++
> net/core/ethtool.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 80 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 89d68d8..f6500f3 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -137,6 +137,23 @@ struct ethtool_eeprom {
> };
>
> /**
> + * struct ethtool_modinfo - plugin module eeprom information
> + * @cmd: ETHTOOL_GMODULEINFO
> + * @type: Standard the module information conforms to SFF_xxxx
You renamed the type codes to begin with 'ETH_MODULE_SFF_', so this line
needs to be updated too.
> + * @eeprom_len: Length of the eeprom
> + *
> + * This structure is used to return the information to
> + * properly size memory for a subsequent call to ETHTOOL_GMODULEEEPROM
[...]
The type code is also essential in order to parse the information.
Also, a minor nitpick: you should put a '%' in front of the names of
constants so they can be pretty-printed properly.
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.
prev parent reply other threads:[~2012-04-24 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 15:39 [PATCH net-next 2/3] Add capability to retrieve plug-in module EEPROM Stuart Hodgson
2012-04-24 17:29 ` Ben Hutchings [this message]
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=1335288545.17274.35.camel@bwh-desktop.uk.solarflarecom.com \
--to=bhutchings@solarflare.com \
--cc=alexander.h.duyck@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=decot@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=smhodgson@solarflare.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