All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <simon.horman@corigine.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Subject: Re: [PATCH net-next 3/6] net: enetc: add definition for offset between eMAC and pMAC regs
Date: Mon, 23 Jan 2023 13:44:07 +0100	[thread overview]
Message-ID: <Y86BFyhhh1SA97dw@corigine.com> (raw)
In-Reply-To: <20230123112411.ofw6cx3qv6uh4txi@skbuf>

On Mon, Jan 23, 2023 at 01:24:11PM +0200, Vladimir Oltean wrote:
> On Sun, Jan 22, 2023 at 05:29:33PM +0100, Simon Horman wrote:
> > > +#define ENETC_PMAC_OFFSET	0x1000
> > > +
> > >  #define ENETC_PM0_CMD_CFG	0x8008
> > >  #define ENETC_PM1_CMD_CFG	0x9008
> > >  #define ENETC_PM0_TX_EN		BIT(0)
> > > @@ -280,57 +282,57 @@ enum enetc_bdr_type {TX, RX};
> > >  /* Port MAC counters: Port MAC 0 corresponds to the eMAC and
> > >   * Port MAC 1 to the pMAC.
> > >   */
> > > -#define ENETC_PM_REOCT(mac)	(0x8100 + 0x1000 * (mac))
> > > -#define ENETC_PM_RALN(mac)	(0x8110 + 0x1000 * (mac))
> > 
> > ...
> > 
> > > +#define ENETC_PM_REOCT(mac)	(0x8100 + ENETC_PMAC_OFFSET * (mac))
> > > +#define ENETC_PM_RALN(mac)	(0x8110 + ENETC_PMAC_OFFSET * (mac))
> > 
> > I'm not sure if it is an improvement, but did you consider something
> > like this? *completely untested*
> > 
> > #define ENETC_PM(mac, reg)	((reg) + ENETC_PMAC_OFFSET * (mac))
> > #define ENETC_PM_REOCT(mac)	ENETC_PM(mac, 0x8100)
> > #define ENETC_PM_RALN(mac)	ENETC_PM(mac, 0x8110)
> 
> Hmm, I appreciate you looking at the patch, but in the end, I just
> consider your proposed alternative to be a variation on the same theme,
> and not necessarily a better way of expressing the definitions.
> This means I wouldn't consider resending the patch set just to make this
> change.

Thanks for considering my idea. I've no objections to you not acting on it.

  reply	other threads:[~2023-01-23 12:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 16:04 [PATCH net-next 0/6] ENETC MAC Merge cleanup Vladimir Oltean
2023-01-19 16:04 ` [PATCH net-next 1/6] net: enetc: build common object files into a separate module Vladimir Oltean
2023-01-19 16:04 ` [PATCH net-next 2/6] net: enetc: detect frame preemption hardware capability Vladimir Oltean
2023-01-19 16:04 ` [PATCH net-next 3/6] net: enetc: add definition for offset between eMAC and pMAC regs Vladimir Oltean
2023-01-22 16:29   ` Simon Horman
2023-01-23 11:24     ` Vladimir Oltean
2023-01-23 12:44       ` Simon Horman [this message]
2023-01-19 16:04 ` [PATCH net-next 4/6] net: enetc: stop configuring pMAC in lockstep with eMAC Vladimir Oltean
2023-01-19 16:04 ` [PATCH net-next 5/6] net: enetc: implement software lockstep for port MAC registers Vladimir Oltean
2023-01-19 16:04 ` [PATCH net-next 6/6] net: enetc: stop auto-configuring the port pMAC Vladimir Oltean
2023-01-23 13:20 ` [PATCH net-next 0/6] ENETC MAC Merge cleanup patchwork-bot+netdevbpf

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=Y86BFyhhh1SA97dw@corigine.com \
    --to=simon.horman@corigine.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.