From: "Regus, Ciprian" <Ciprian.Regus@analog.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: RE: [PATCH net-next v3 07/13] net: ethernet: oa_tc6: Add read_mms/write_mms register access functions
Date: Tue, 9 Jun 2026 12:13:35 +0000 [thread overview]
Message-ID: <8fd58bbcd30f490ea747ca0f9479e3cc@analog.com> (raw)
In-Reply-To: <905f32c3-9638-46e4-8f52-1bc874f4e8b9@lunn.ch>
> > +/**
> > + * oa_tc6_read_register_mms - function for reading a MAC-PHY register
> in a
> > + * memory map other than 0.
>
> Is MMS 0 somehow special? Does it not work if passed to this function?
For addressing registers in MMS 0, we can just use the already existing oa_tc6_read_register
and oa_tc6_write_register functions. So, I meant to say that for transfers to memory maps
other than 0, this function can be used instead. Passing 0 in the mms parameter would
result in the same behavior as if the user called oa_tc6_read_register() with the upper 16 bits
of the addr masked (so there is nothing special about this case).
I agree the documentation is poorly worded and I'll change it to something like this in v4:
/**
* oa_tc6_read_register_mms - function for reading a MAC-PHY register in a specified
* memory map.
>
> I'm not suggesting all the current calls are replaced with this, just
> that the documentation might be inaccurate?
>
> > + * @tc6: oa_tc6 struct.
> > + * @mms: Memory map selector for the register.
> > + * @address: register address of the MAC-PHY to be read.
> > + * @value: value read from the @address register address of the MAC-
> PHY.
> > + *
> > + * Return: 0 on success otherwise failed.
>
> Isn't the "otherwise" actually an error code?
This function can return the same set of error codes as oa_tc6_read_register/ oa_tc6_write_register.
Those can be -EPROTO, -EINVAL or any error code returned by the spi_sync(). Since the other register
access functions have the same documentation for the return values, I kept it the same here.
I'll change it to "0 on success or a negative error code on failure".
>
> Andrew
next prev parent reply other threads:[~2026-06-09 12:14 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 16:32 [PATCH net-next v3 00/13] net: Add ADIN1140 support Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 16:32 ` [PATCH net-next v3 01/13] dt-bindings: net: Add ADIN1140 Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 16:39 ` Conor Dooley
2026-06-04 16:32 ` [PATCH net-next v3 02/13] net: ethernet: oa_tc6: Handle the OA TC6 SPI protected mode Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-05 16:33 ` sashiko-bot
2026-06-04 16:32 ` [PATCH net-next v3 03/13] net: ethernet: oa_tc6: add OA_TC6_BROKEN_PHY quirk flag Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-05 16:33 ` sashiko-bot
2026-06-04 16:32 ` [PATCH net-next v3 04/13] net: ethernet: oa_tc6: Export the C45 access functions Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-05 16:33 ` sashiko-bot
2026-06-04 16:32 ` [PATCH net-next v3 05/13] net: ethernet: oa_tc6: Export standard defined registers Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 22:13 ` Andrew Lunn
2026-06-05 16:33 ` sashiko-bot
2026-06-04 16:32 ` [PATCH net-next v3 06/13] net: ethernet: oa_tc6: Add the OA_TC6_ prefix to standard registers Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 22:14 ` Andrew Lunn
2026-06-04 16:32 ` [PATCH net-next v3 07/13] net: ethernet: oa_tc6: Add read_mms/write_mms register access functions Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 22:19 ` Andrew Lunn
2026-06-09 12:13 ` Regus, Ciprian [this message]
2026-06-04 22:21 ` Andrew Lunn
2026-06-04 16:32 ` [PATCH net-next v3 08/13] net: ethernet: oa_tc6: Use the read_mms/write_mms functions for C45 Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 22:23 ` Andrew Lunn
2026-06-04 16:32 ` [PATCH net-next v3 09/13] net: ethernet: oa_tc6: Add new register address defines Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 22:31 ` Andrew Lunn
2026-06-04 16:32 ` [PATCH net-next v3 10/13] net: phy: add generic helpers for direct C45 MMD access Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 16:32 ` [PATCH net-next v3 11/13] net: phy: microchip-t1s: use generic C45 MMD access helpers Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 16:32 ` [PATCH net-next v3 12/13] net: phy: Add support for the ADIN1140 PHY Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 16:32 ` [PATCH net-next v3 13/13] net: ethernet: adi: Add a driver for the ADIN1140 MACPHY Ciprian Regus via B4 Relay
2026-06-04 16:32 ` Ciprian Regus
2026-06-04 22:36 ` Andrew Lunn
2026-06-05 16:33 ` sashiko-bot
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=8fd58bbcd30f490ea747ca0f9479e3cc@analog.com \
--to=ciprian.regus@analog.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parthiban.veerasooran@microchip.com \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
/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.