public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Fidan Aliyeva <fidan.aliyeva.ext@ericsson.com>
To: <andrew@lunn.ch>
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>,
	<fidan.aliyeva.ext@ericsson.com>
Subject: Re: Re: [PATCH net-next v2 1/2] mv88e6xxx: Refactor 6352's serdes functions
Date: Fri, 1 May 2026 23:00:36 +0200	[thread overview]
Message-ID: <20260501210036.1675100-1-fidan.aliyeva.ext@ericsson.com> (raw)
In-Reply-To: <1a57e151-7fff-41c7-9616-20237c27e935@lunn.ch>

> > @@ -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.

Hi, Andrew. Thank you for your review and feedback on both this and
previous version.

I wanted to make those functions generic and not introduce new functions
other than 6321_serdes_get_lane. However, those functions cannot be
generalised the obvious way because they run with reg_lock already taken
which would cause deadlock in mv88e6352_serdes_get_lane function.

Do you have proposal on how that problem can be avoided to make these
functions generic, too?

Best,
Fidan

  reply	other threads:[~2026-05-01 21:01 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
2026-05-01 21:00     ` Fidan Aliyeva [this message]
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=20260501210036.1675100-1-fidan.aliyeva.ext@ericsson.com \
    --to=fidan.aliyeva.ext@ericsson.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.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