netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Pop <popadrian1996@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	jiri@mellanox.com, vadimp@mellanox.com, mlxsw@mellanox.com,
	Ido Schimmel <idosch@mellanox.com>,
	Roopa Prabhu <roopa@nvidia.com>,
	Paul Schmidt <paschmidt@nvidia.com>
Subject: Re: [PATCH ethtool v2] Add QSFP-DD support
Date: Thu, 6 Aug 2020 19:21:21 +0300	[thread overview]
Message-ID: <CAL_jBfSZDGbKiKCjcdQ8uaHvtxxb0P4Rktw9TutWEGCfscJ=EQ@mail.gmail.com> (raw)
In-Reply-To: <20200806180759.GD2005851@lunn.ch>

Hi Andrew!

Should I resubmit v3 after I delete the code that has to do with page
0x10 and 0x11?

Adrian

On Thu, 6 Aug 2020 at 21:08, Andrew Lunn <andrew@lunn.ch> wrote:
>
> Hi Adrian
>
> > +static void
> > +qsfp_dd_parse_diagnostics(const __u8 *id, struct qsfp_dd_diags *const sd)
> > +{
> > +     __u16 rx_power_offset;
> > +     __u16 tx_power_offset;
> > +     __u16 tx_bias_offset;
> > +     __u16 temp_offset;
> > +     __u16 volt_offset;
> > +     int i;
> > +
> > +     for (i = 0; i < QSFP_DD_MAX_CHANNELS; ++i) {
> > +             /*
> > +              * Add Tx/Rx output/input optical power relevant information.
> > +              * To access the info for the ith lane, we have to skip i * 2
> > +              * bytes starting from the offset of the first lane for that
> > +              * specific channel property.
> > +              */
> > +             tx_bias_offset = QSFP_DD_TX_BIAS_START_OFFSET + (i << 1);
> > +             rx_power_offset = QSFP_DD_RX_PWR_START_OFFSET + (i << 1);
> > +             tx_power_offset = QSFP_DD_TX_PWR_START_OFFSET + (i << 1);
>
> > +/*-----------------------------------------------------------------------
> > + * Upper Memory Page 0x10: contains dynamic control bytes.
> > + * RealOffset = 3 * 0x80 + LocalOffset
> > + */
> > +#define PAG10H_OFFSET                                (0x03 * 0x80)
> > +
> > +/*-----------------------------------------------------------------------
> > + * Upper Memory Page 0x11: contains lane dynamic status bytes.
> > + * RealOffset = 4 * 0x80 + LocalOffset
> > + */
> > +#define PAG11H_OFFSET                                (0x04 * 0x80)
> > +#define QSFP_DD_TX_PWR_START_OFFSET          (PAG11H_OFFSET + 0x9A)
> > +#define QSFP_DD_TX_BIAS_START_OFFSET         (PAG11H_OFFSET + 0xAA)
> > +#define QSFP_DD_RX_PWR_START_OFFSET          (PAG11H_OFFSET + 0xBA)
> > +
> > +/* HA = High Alarm; LA = Low Alarm
> > + * HW = High Warning; LW = Low Warning
> > + */
> > +#define QSFP_DD_TX_HA_OFFSET                 (PAG11H_OFFSET + 0x8B)
> > +#define QSFP_DD_TX_LA_OFFSET                 (PAG11H_OFFSET + 0x8C)
> > +#define QSFP_DD_TX_HW_OFFSET                 (PAG11H_OFFSET + 0x8D)
> > +#define QSFP_DD_TX_LW_OFFSET                 (PAG11H_OFFSET + 0x8E)
> > +
> > +#define QSFP_DD_RX_HA_OFFSET                 (PAG11H_OFFSET + 0x95)
> > +#define QSFP_DD_RX_LA_OFFSET                 (PAG11H_OFFSET + 0x96)
> > +#define QSFP_DD_RX_HW_OFFSET                 (PAG11H_OFFSET + 0x97)
> > +#define QSFP_DD_RX_LW_OFFSET                 (PAG11H_OFFSET + 0x98)
>
> You still have code which implies page 0x10 and 0x11 follow directly
> after page 2. This is something i would like to avoid until we have a
> driver which really does export these pages. Please could you remove
> all this code.
>
> Thanks
>         Andrew

  reply	other threads:[~2020-08-06 18:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 14:59 [PATCH ethtool v2] Add QSFP-DD support Adrian Pop
2020-08-06 18:07 ` Andrew Lunn
2020-08-06 16:21   ` Adrian Pop [this message]
2020-08-08 14:30     ` Andrew Lunn
2020-08-13  7:23       ` Adrian Pop

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='CAL_jBfSZDGbKiKCjcdQ8uaHvtxxb0P4Rktw9TutWEGCfscJ=EQ@mail.gmail.com' \
    --to=popadrian1996@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=paschmidt@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=vadimp@mellanox.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).