netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr
       [not found] <20220424141759.315303-1-nathan@nathanrossi.com>
@ 2022-04-24 14:52 ` Marek Behún
  2022-04-24 19:18   ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Behún @ 2022-04-24 14:52 UTC (permalink / raw)
  To: Nathan Rossi
  Cc: netdev, linux-kernel, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Paolo Abeni

On Sun, 24 Apr 2022 14:17:59 +0000
Nathan Rossi <nathan@nathanrossi.com> wrote:

> The other port_hidden functions rely on the port_read/port_write
> functions to access the hidden control port. These functions apply the
> offset for port_base_addr where applicable. Update port_hidden_wait to
> use the port_wait_bit so that port_base_addr offsets are accounted for
> when waiting for the busy bit to change.
> 
> Without the offset the port_hidden_wait function would timeout on
> devices that have a non-zero port_base_addr (e.g. MV88E6141), however
> devices that have a zero port_base_addr would operate correctly (e.g.
> MV88E6390).

So basically the code is accessing the wrong register for devices with
non-zero port_base_addr. This means that the patch should have a Fixes
tag with the commit that introduced this bug, so that it gets
backported to relevant stable versions.

Could you resend with Fixes tag?

Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr
  2022-04-24 14:52 ` [PATCH] net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr Marek Behún
@ 2022-04-24 19:18   ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2022-04-24 19:18 UTC (permalink / raw)
  To: Marek Behún
  Cc: Nathan Rossi, netdev, linux-kernel, Vivien Didelot,
	Florian Fainelli, Vladimir Oltean, David S. Miller,
	Jakub Kicinski, Paolo Abeni

On Sun, Apr 24, 2022 at 04:52:28PM +0200, Marek Behún wrote:
> On Sun, 24 Apr 2022 14:17:59 +0000
> Nathan Rossi <nathan@nathanrossi.com> wrote:
> 
> > The other port_hidden functions rely on the port_read/port_write
> > functions to access the hidden control port. These functions apply the
> > offset for port_base_addr where applicable. Update port_hidden_wait to
> > use the port_wait_bit so that port_base_addr offsets are accounted for
> > when waiting for the busy bit to change.
> > 
> > Without the offset the port_hidden_wait function would timeout on
> > devices that have a non-zero port_base_addr (e.g. MV88E6141), however
> > devices that have a zero port_base_addr would operate correctly (e.g.
> > MV88E6390).
> 
> So basically the code is accessing the wrong register for devices with
> non-zero port_base_addr. This means that the patch should have a Fixes
> tag with the commit that introduced this bug, so that it gets
> backported to relevant stable versions.
> 
> Could you resend with Fixes tag?

I think that would be:

Fixes: 609070133aff ("net: dsa: mv88e6xxx: update code operating on hidden registers")

That patch moved the code out of chip.c into port_hidden. At the same
time, the functions got renamed from mv88e6390_hidden_read() to
mv886xxx_hidden_read(). 6390 does have zero-based ports, so was
correct before the rename. But the more generic name suggest it should
take into account devices which do not have zero based ports.

With the fixes tag added and based on met:

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-24 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220424141759.315303-1-nathan@nathanrossi.com>
2022-04-24 14:52 ` [PATCH] net: dsa: mv88e6xxx: Fix port_hidden_wait to account for port_base_addr Marek Behún
2022-04-24 19:18   ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).