public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Fidan Aliyeva <fidan.aliyeva.ext@ericsson.com>
Cc: olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas.eckerman.ext@ericsson.com
Subject: Re: [PATCH net-next v2 1/2] mv88e6xxx: Refactor 6352's serdes functions
Date: Thu, 30 Apr 2026 21:06:02 +0200	[thread overview]
Message-ID: <1a57e151-7fff-41c7-9616-20237c27e935@lunn.ch> (raw)
In-Reply-To: <20260430124907.3533344-2-fidan.aliyeva.ext@ericsson.com>

> @@ -185,7 +200,7 @@ size_t mv88e6352_serdes_get_stats(struct mv88e6xxx_chip *chip, int port,
> 
>  	for (i = 0; i < ARRAY_SIZE(mv88e6352_serdes_hw_stats); i++) {
>  		stat = &mv88e6352_serdes_hw_stats[i];
> -		value = mv88e6352_serdes_get_stat(chip, stat);
> +		value = mv88e6352_serdes_get_stat(chip, MV88E6352_ADDR_SERDES, stat);

If you generalise this, you can use the same code for the mv88e6321.

> +void mv88e6352_serdes_get_regs(struct mv88e6xxx_chip *chip, int port, void *_p)
> +{
> +	int err;
> +
> +	err = mv88e6352_g2_scratch_port_has_serdes(chip, port);
> +	if (err <= 0)
> +		return;
> +
> +	mv88e6352_serdes_get_regs_from_lane(chip, MV88E6352_ADDR_SERDES, _p);

Here as well.

This is however looking a lot better. Thanks for the generalisation
patch.

    Andrew

---
pw-bot: cr

  reply	other threads:[~2026-04-30 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 12:49 [PATCH net-next v2 0/2] mv88e6xxx: SERDES on mv88e6321 letter Fidan Aliyeva
2026-04-30 12:49 ` [PATCH net-next v2 1/2] mv88e6xxx: Refactor 6352's serdes functions Fidan Aliyeva
2026-04-30 19:06   ` Andrew Lunn [this message]
2026-05-01 21:00     ` Fidan Aliyeva
2026-05-01 22:10       ` Andrew Lunn
2026-05-02  9:25         ` Fidan Aliyeva
2026-05-02 13:55           ` Andrew Lunn
2026-05-03 21:45             ` Fidan Aliyeva
2026-04-30 12:49 ` [PATCH net-next v2 2/2] mv88e6xxx: Add SERDES Support for mv88e6321 Fidan Aliyeva
2026-05-04 15:05 ` [PATCH net-next v2 0/2] mv88e6xxx: SERDES on mv88e6321 letter Marek Behún

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=1a57e151-7fff-41c7-9616-20237c27e935@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fidan.aliyeva.ext@ericsson.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=thomas.eckerman.ext@ericsson.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