From: Vladimir Oltean <olteanv@gmail.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH net-next 1/5] net: dsa: mv88e6xxx: rename TAI definitions according to core
Date: Tue, 16 Sep 2025 17:35:33 +0300 [thread overview]
Message-ID: <20250916143533.3jqqlpyp62gjwhh7@skbuf> (raw)
In-Reply-To: <aMlnwFGS-uBbBzRF@shell.armlinux.org.uk>
On Tue, Sep 16, 2025 at 02:36:00PM +0100, Russell King (Oracle) wrote:
> On Tue, Sep 16, 2025 at 11:46:45AM +0300, Vladimir Oltean wrote:
> > On Mon, Sep 15, 2025 at 02:06:15PM +0100, Russell King (Oracle) wrote:
> > > /* Offset 0x09: Event Status */
> > > -#define MV88E6XXX_TAI_EVENT_STATUS 0x09
> > > -#define MV88E6XXX_TAI_EVENT_STATUS_ERROR 0x0200
> > > -#define MV88E6XXX_TAI_EVENT_STATUS_VALID 0x0100
> > > -#define MV88E6XXX_TAI_EVENT_STATUS_CTR_MASK 0x00ff
> > > -
> > > /* Offset 0x0A/0x0B: Event Time */
> >
> > Was it intentional to keep the comment for a register with removed
> > definitions, and this placement for it? It looks like this (confusing
> > to me):
> >
> > /* Offset 0x09: Event Status */
> > /* Offset 0x0A/0x0B: Event Time */
> > #define MV88E6352_TAI_EVENT_STATUS 0x09
>
> Yes, totally intentional.
>
> All three registers are read by the code - as a single block, rather
> than individually. While the definitions for the event time are not
> referenced, I wanted to keep their comment, and that seemed to be
> the most logical way.
What I don't find so logical is that the bit fields of MV88E6352_TAI_EVENT_STATUS
follow a comment which refers to "Event Time".
Do we read the registers in a single mv88e6xxx_tai_read() call because
the hardware requires us, or because of convenience? For writes, we
write only a single u16 corresponding to the Event Status, so I suspect
they are not completely indivisible, but I don't have documentation to
confirm.
This is more of what I was expecting.
/* Offset 0x09: Event Status */
#define MV88E6352_TAI_EVENT_STATUS 0x09
#define MV88E6352_TAI_EVENT_STATUS_CAP_TRIG 0x4000
#define MV88E6352_TAI_EVENT_STATUS_ERROR 0x0200
#define MV88E6352_TAI_EVENT_STATUS_VALID 0x0100
#define MV88E6352_TAI_EVENT_STATUS_CTR_MASK 0x00ff
/* Offset 0x0A/0x0B: Event Time Lo/Hi. Always read together with Event Status */
Anyway, this is not so important.
next prev parent reply other threads:[~2025-09-16 14:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 13:05 [PATCH net-next 0/5] net: dsa: mv88e6xxx: further PTP-related cleanups Russell King (Oracle)
2025-09-15 13:06 ` [PATCH net-next 1/5] net: dsa: mv88e6xxx: rename TAI definitions according to core Russell King (Oracle)
2025-09-16 8:46 ` Vladimir Oltean
2025-09-16 13:36 ` Russell King (Oracle)
2025-09-16 14:35 ` Vladimir Oltean [this message]
2025-09-16 16:14 ` Russell King (Oracle)
2025-09-15 13:06 ` [PATCH net-next 2/5] net: dsa: mv88e6xxx: remove unused TAI definitions Russell King (Oracle)
2025-09-16 9:23 ` Vladimir Oltean
2025-09-15 13:06 ` [PATCH net-next 3/5] net: dsa: mv88e6xxx: remove duplicated register definition Russell King (Oracle)
2025-09-16 9:22 ` Vladimir Oltean
2025-09-15 13:06 ` [PATCH net-next 4/5] net: dsa: mv88e6xxx: remove unused 88E6165 register definitions Russell King (Oracle)
2025-09-15 13:06 ` [PATCH net-next 5/5] net: dsa: mv88e6xxx: move mv88e6xxx_hwtstamp_work() prototype Russell King (Oracle)
2025-09-16 8:09 ` Vladimir Oltean
2025-09-16 8:36 ` Russell King (Oracle)
2025-09-16 9:03 ` Vladimir Oltean
2025-09-16 12:46 ` Andrew Lunn
2025-09-16 15:31 ` Russell King (Oracle)
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=20250916143533.3jqqlpyp62gjwhh7@skbuf \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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