[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJE/etYozqB7GZaK@lunn.ch>
Date: Tue, 4 May 2021 14:35:06 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Don Bollinger <don@...bollingers.org>
Cc: 'Moshe Shemesh' <moshe@...dia.com>,
'Michal Kubecek' <mkubecek@...e.cz>,
'Jakub Kicinski' <kuba@...nel.org>, netdev@...r.kernel.org,
'Vladyslav Tarasiuk' <vladyslavt@...dia.com>
Subject: Re: [PATCH ethtool-next 2/4] ethtool: Refactor human-readable module
EEPROM output
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
Powered by blists - more mailing lists