From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Daniel Golle <daniel@makrotopia.org>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 3/4] net: dsa: mxl862xx: move API macros to mxl862xx-host.h
Date: Thu, 21 May 2026 16:07:56 +0200 [thread overview]
Message-ID: <aba1e067-1eb5-4be4-b571-99a5eb03bc76@bootlin.com> (raw)
In-Reply-To: <b6682128d4550c6d1591ad27a21866e4d6c5507b.1779330653.git.daniel@makrotopia.org>
Hi,
On 5/21/26 04:40, Daniel Golle wrote:
> Move the MXL862XX_API_WRITE, MXL862XX_API_READ and
> MXL862XX_API_READ_QUIET convenience macros from mxl862xx.c to
> mxl862xx-host.h next to the mxl862xx_api_wrap() prototype they wrap.
> This makes them available to other compilation units that include
> mxl862xx-host.h, which is needed once the SerDes PCS code in
> mxl862xx-phylink.c also calls firmware commands.
>
> No functional change.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> v2: no changes
>
> drivers/net/dsa/mxl862xx/mxl862xx-host.h | 8 ++++++++
> drivers/net/dsa/mxl862xx/mxl862xx.c | 7 -------
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/dsa/mxl862xx/mxl862xx-host.h b/drivers/net/dsa/mxl862xx/mxl862xx-host.h
> index 84512a30bc18..66d6ae198aff 100644
> --- a/drivers/net/dsa/mxl862xx/mxl862xx-host.h
> +++ b/drivers/net/dsa/mxl862xx/mxl862xx-host.h
> @@ -9,6 +9,14 @@ void mxl862xx_host_init(struct mxl862xx_priv *priv);
> void mxl862xx_host_shutdown(struct mxl862xx_priv *priv);
> int mxl862xx_api_wrap(struct mxl862xx_priv *priv, u16 cmd, void *data, u16 size,
> bool read, bool quiet);
> +
> +#define MXL862XX_API_WRITE(dev, cmd, data) \
> + mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), false, false)
> +#define MXL862XX_API_READ(dev, cmd, data) \
> + mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), true, false)
> +#define MXL862XX_API_READ_QUIET(dev, cmd, data) \
> + mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), true, true)
> +
> int mxl862xx_reset(struct mxl862xx_priv *priv);
>
> #endif /* __MXL862XX_HOST_H */
> diff --git a/drivers/net/dsa/mxl862xx/mxl862xx.c b/drivers/net/dsa/mxl862xx/mxl862xx.c
> index a193f3c07d35..0b1a23364eb5 100644
> --- a/drivers/net/dsa/mxl862xx/mxl862xx.c
> +++ b/drivers/net/dsa/mxl862xx/mxl862xx.c
> @@ -24,13 +24,6 @@
> #include "mxl862xx-host.h"
> #include "mxl862xx-phylink.h"
>
> -#define MXL862XX_API_WRITE(dev, cmd, data) \
> - mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), false, false)
> -#define MXL862XX_API_READ(dev, cmd, data) \
> - mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), true, false)
> -#define MXL862XX_API_READ_QUIET(dev, cmd, data) \
> - mxl862xx_api_wrap(dev, cmd, &(data), sizeof((data)), true, true)
> -
> /* Polling interval for RMON counter accumulation. At 2.5 Gbps with
> * minimum-size (64-byte) frames, a 32-bit packet counter wraps in ~880s.
> * 2s gives a comfortable margin.
next prev parent reply other threads:[~2026-05-21 14:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 2:39 [PATCH v2 0/4] net: dsa: mxl862xx: add SerDes ports Daniel Golle
2026-05-21 2:40 ` [PATCH v2 1/4] net: dsa: mxl862xx: store firmware version for feature gating Daniel Golle
2026-05-21 2:40 ` [PATCH v2 2/4] net: dsa: mxl862xx: move phylink stubs to mxl862xx-phylink.c Daniel Golle
2026-05-21 14:07 ` Maxime Chevallier
2026-05-21 2:40 ` [PATCH v2 3/4] net: dsa: mxl862xx: move API macros to mxl862xx-host.h Daniel Golle
2026-05-21 14:07 ` Maxime Chevallier [this message]
2026-05-21 2:41 ` [PATCH v2 4/4] net: dsa: mxl862xx: add support for SerDes ports Daniel Golle
2026-05-21 12:54 ` Maxime Chevallier
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=aba1e067-1eb5-4be4-b571-99a5eb03bc76@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=andrew@lunn.ch \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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
Powered by JetHome