netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Don Bollinger <don@thebollingers.org>
Cc: 'Moshe Shemesh' <moshe@nvidia.com>,
	'Michal Kubecek' <mkubecek@suse.cz>,
	'Jakub Kicinski' <kuba@kernel.org>,
	netdev@vger.kernel.org,
	'Vladyslav Tarasiuk' <vladyslavt@nvidia.com>
Subject: Re: [PATCH ethtool-next 2/4] ethtool: Refactor human-readable module EEPROM output
Date: Tue, 4 May 2021 14:35:06 +0200	[thread overview]
Message-ID: <YJE/etYozqB7GZaK@lunn.ch> (raw)
In-Reply-To: <008601d73e09$211d11e0$635735a0$@thebollingers.org>

Hi Don

Please trim the text of the email when replying. Standard netiquette
best practices.

> > -#define PAG01H_UPPER_OFFSET			(0x01 * 0x80)
> > +#define PAG01H_UPPER_OFFSET			(0x02 * 0x80)
> > 
> >  /* Supported Link Length (Page 1) */
> > -#define QSFP_DD_SMF_LEN_OFFSET
> > 	(PAG01H_UPPER_OFFSET + 0x84)
> > -#define QSFP_DD_OM5_LEN_OFFSET
> > 	(PAG01H_UPPER_OFFSET + 0x85)
> > -#define QSFP_DD_OM4_LEN_OFFSET
> > 	(PAG01H_UPPER_OFFSET + 0x86)
> > -#define QSFP_DD_OM3_LEN_OFFSET
> > 	(PAG01H_UPPER_OFFSET + 0x87)
> > -#define QSFP_DD_OM2_LEN_OFFSET
> > 	(PAG01H_UPPER_OFFSET + 0x88)
> > +#define QSFP_DD_SMF_LEN_OFFSET			0x4
> > +#define QSFP_DD_OM5_LEN_OFFSET			0x5
> > +#define QSFP_DD_OM4_LEN_OFFSET			0x6
> > +#define QSFP_DD_OM3_LEN_OFFSET			0x7
> > +#define QSFP_DD_OM2_LEN_OFFSET			0x8
> 
> I see here you have switched from offsets from the beginning of flat linear
> memory to offsets within the upper half page.  I recommend actually using
> the values in the spec, which are offset from the base of the page.

I agree with this. Being able to easily map between spec and code is
important.

	Andrew

  reply	other threads:[~2021-05-04 12:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23  7:23 [PATCH ethtool-next 0/4] Extend module EEPROM API Moshe Shemesh
2021-04-23  7:23 ` [PATCH ethtool-next 1/4] ethtool: Add netlink handler for getmodule (-m) Moshe Shemesh
2021-04-23  7:23 ` [PATCH ethtool-next 2/4] ethtool: Refactor human-readable module EEPROM output Moshe Shemesh
2021-04-30 21:38   ` Don Bollinger
2021-05-04 12:35     ` Andrew Lunn [this message]
2021-04-23  7:23 ` [PATCH ethtool-next 3/4] ethtool: Rename QSFP-DD identifiers to use CMIS 4.0 Moshe Shemesh
2021-04-23  7:23 ` [PATCH ethtool-next 4/4] ethtool: Update manpages for getmodule (-m) command Moshe Shemesh
2021-04-30 21:55   ` Don Bollinger
2021-04-30 20:54 ` [PATCH ethtool-next 0/4] Extend module EEPROM API Don Bollinger
2021-04-30 21:57   ` Andrew Lunn
2021-04-30 22:15     ` Don Bollinger
2021-05-04 12:59       ` Andrew Lunn

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=YJE/etYozqB7GZaK@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=don@thebollingers.org \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladyslavt@nvidia.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).