From: "Radu Pirea (OSS)" <radu-nicolae.pirea@oss.nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
richardcochran@gmail.com, sd@queasysnail.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC net-next v1 3/5] net: phy: nxp-c45-tja11xx add MACsec support
Date: Wed, 16 Aug 2023 11:18:38 +0300 [thread overview]
Message-ID: <a72d3396-7f7b-c9a5-e4b9-e9335e0feba3@oss.nxp.com> (raw)
In-Reply-To: <61f88d08-b741-48d0-90cb-9554907a9dec@lunn.ch>
On 11.08.2023 20:10, Andrew Lunn wrote:
>> +#define VEND1_MACSEC_BASE 0x9000
>> +
>> +#define MACSEC_CFG 0x0000
>> +#define MACSEC_CFG_BYPASS BIT(1)
>> +#define MACSEC_CFG_S0I BIT(0)
>> +
>> +#define MACSEC_TPNET 0x0044
>
>> +static int nxp_c45_macsec_write(struct phy_device *phydev, u16 reg, u32 val)
>> +{
>> + reg = reg / 2;
>
> That is a bit odd. How does the data sheet describe these
> registers. e.g. MACSEC_TPNET. Does it say 0x9022 and 0x9023? It seems
> it would be easy to mix this up and end up accessing 0x9011 and
> 0x9012.
>
> Andrew
According to the MACsec IP user manual, the registers are 32 bits wide
and the addresses are 4 byte aligned. The PHY translates two writes in
two consecutive registers in one write in the MACsec IP.
I agree. It's too easy to write the wrong address here. I should check
the address alignment.
--
Radu P.
next prev parent reply other threads:[~2023-08-16 8:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 15:32 [RFC net-next v1 0/5] Add MACsec support for TJA11XX C45 PHYs Radu Pirea (NXP OSS)
2023-08-11 15:32 ` [RFC net-next v1 1/5] net: macsec: declare macsec_pn_wrapped shim Radu Pirea (NXP OSS)
2023-08-11 15:32 ` [RFC net-next v1 2/5] net: phy: remove MACSEC guard Radu Pirea (NXP OSS)
2023-08-11 16:59 ` Andrew Lunn
2023-08-14 15:35 ` Sabrina Dubroca
2023-08-14 15:50 ` Andrew Lunn
2023-08-11 15:32 ` [RFC net-next v1 3/5] net: phy: nxp-c45-tja11xx add MACsec support Radu Pirea (NXP OSS)
2023-08-11 17:10 ` Andrew Lunn
2023-08-16 8:18 ` Radu Pirea (OSS) [this message]
2023-08-12 18:01 ` Simon Horman
2023-08-11 15:32 ` [RFC net-next v1 4/5] net: macsec: introduce mdo_insert_tx_tag Radu Pirea (NXP OSS)
2023-08-11 17:42 ` Andrew Lunn
2023-08-16 10:12 ` Radu Pirea (OSS)
2023-08-12 18:07 ` Simon Horman
2023-08-16 10:19 ` Radu Pirea (OSS)
2023-08-16 20:40 ` Sabrina Dubroca
2023-08-17 8:25 ` Radu Pirea (OSS)
2023-08-17 10:31 ` Sabrina Dubroca
2023-08-17 11:19 ` Radu Pirea (OSS)
2023-08-11 15:32 ` [RFC net-next v1 5/5] net: phy: nxp-c45-tja11xx: implement mdo_insert_tx_tag Radu Pirea (NXP OSS)
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=a72d3396-7f7b-c9a5-e4b9-e9335e0feba3@oss.nxp.com \
--to=radu-nicolae.pirea@oss.nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=sd@queasysnail.net \
/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
all inboxes | Powered by JetHome®