netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
@ 2021-04-26 23:34 Andrew Lunn
  2021-04-26 23:36 ` Andrew Lunn
  2021-04-30 14:01 ` Andrew Lunn
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-04-26 23:34 UTC (permalink / raw)
  To: David Miller
  Cc: 曹煜, netdev, Chris Packham, Vivien Didelot, Andrew Lunn

The datasheets suggests the 6161 uses a per port setting for jumbo
frames. Testing has however shown this is not correct, it uses the old
style chip wide MTU control. Change the ops in the 6161 structure to
reflect this.

Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
Reported by: 曹煜 <cao88yu@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index e08bf9377140..42941dd950fa 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -3502,7 +3502,6 @@ static const struct mv88e6xxx_ops mv88e6161_ops = {
 	.port_set_ucast_flood = mv88e6352_port_set_ucast_flood,
 	.port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
 	.port_set_ether_type = mv88e6351_port_set_ether_type,
-	.port_set_jumbo_size = mv88e6165_port_set_jumbo_size,
 	.port_egress_rate_limiting = mv88e6097_port_egress_rate_limiting,
 	.port_pause_limit = mv88e6097_port_pause_limit,
 	.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
@@ -3527,6 +3526,7 @@ static const struct mv88e6xxx_ops mv88e6161_ops = {
 	.avb_ops = &mv88e6165_avb_ops,
 	.ptp_ops = &mv88e6165_ptp_ops,
 	.phylink_validate = mv88e6185_phylink_validate,
+	.set_max_frame_size = mv88e6185_g1_set_max_frame_size,
 };
 
 static const struct mv88e6xxx_ops mv88e6165_ops = {
-- 
2.31.0


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

* Re: [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
  2021-04-26 23:34 [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU Andrew Lunn
@ 2021-04-26 23:36 ` Andrew Lunn
  2021-04-27  0:18   ` 曹煜
  2021-04-30 14:01 ` Andrew Lunn
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2021-04-26 23:36 UTC (permalink / raw)
  To: David Miller; +Cc: 曹煜, netdev, Chris Packham, Vivien Didelot

On Tue, Apr 27, 2021 at 01:34:41AM +0200, Andrew Lunn wrote:
> The datasheets suggests the 6161 uses a per port setting for jumbo
> frames. Testing has however shown this is not correct, it uses the old
> style chip wide MTU control. Change the ops in the 6161 structure to
> reflect this.
> 
> Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
> Reported by: 曹煜 <cao88yu@gmail.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Hi Dave

I have no way to test this. Please don't commit it until we get feedback from 曹煜.

Thanks
	Andrew

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

* Re: [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
  2021-04-26 23:36 ` Andrew Lunn
@ 2021-04-27  0:18   ` 曹煜
  2021-04-27  1:35     ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: 曹煜 @ 2021-04-27  0:18 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: David Miller, netdev, Chris Packham, Vivien Didelot

Hi Andrew,
I'll test the patch later, but what about the 88e6171r switch chip,
this chip also got this issue since kernel 5.9.0 Many thanks.

Andrew Lunn <andrew@lunn.ch> 于2021年4月27日周二 上午7:37写道:
>
> On Tue, Apr 27, 2021 at 01:34:41AM +0200, Andrew Lunn wrote:
> > The datasheets suggests the 6161 uses a per port setting for jumbo
> > frames. Testing has however shown this is not correct, it uses the old
> > style chip wide MTU control. Change the ops in the 6161 structure to
> > reflect this.
> >
> > Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
> > Reported by: 曹煜 <cao88yu@gmail.com>
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
>
> Hi Dave
>
> I have no way to test this. Please don't commit it until we get feedback from 曹煜.
>
> Thanks
>         Andrew

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

* Re: [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
  2021-04-27  0:18   ` 曹煜
@ 2021-04-27  1:35     ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-04-27  1:35 UTC (permalink / raw)
  To: 曹煜; +Cc: David Miller, netdev, Chris Packham, Vivien Didelot

On Tue, Apr 27, 2021 at 08:18:00AM +0800, 曹煜 wrote:
> Hi Andrew,
> I'll test the patch later, but what about the 88e6171r switch chip,
> this chip also got this issue since kernel 5.9.0 Many thanks.

Saying the 6171 is wrong i have problems with.

The 6161 is part of the 6165 family, consisting of 6123, 6161 and
6165. The 6123 was already using mv88e6185_g1_set_max_frame_size, and
the documentation is ambiguous.

The 6171 is part of the 6351 family: 6171 6175 6350 6351. It is a
couple of generations newer, and all the other members of the family
also use mv88e6165_port_set_jumbo_size. I have the GPL licensed SDK
from Marvell. If i'm reading the SDK correctly, it has a function to
access the per port register for jumbo settings for the 6351 family.

Do you have a 6171 we can test code on?

   Andrew

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

* Re: [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
  2021-04-26 23:34 [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU Andrew Lunn
  2021-04-26 23:36 ` Andrew Lunn
@ 2021-04-30 14:01 ` Andrew Lunn
  2021-05-03  2:38   ` Chris Packham
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2021-04-30 14:01 UTC (permalink / raw)
  To: David Miller; +Cc: 曹煜, netdev, Chris Packham, Vivien Didelot

On Tue, Apr 27, 2021 at 01:34:41AM +0200, Andrew Lunn wrote:
> The datasheets suggests the 6161 uses a per port setting for jumbo
> frames. Testing has however shown this is not correct, it uses the old
> style chip wide MTU control. Change the ops in the 6161 structure to
> reflect this.
> 
> Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
> Reported by: 曹煜 <cao88yu@gmail.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

self NACK.

We dug deeper and found a different real problem. Patches to follow.

   Andrew

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

* Re: [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
  2021-04-30 14:01 ` Andrew Lunn
@ 2021-05-03  2:38   ` Chris Packham
  2021-05-03 12:16     ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Packham @ 2021-05-03  2:38 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: 曹煜, netdev, Vivien Didelot


On 1/05/21 2:01 am, Andrew Lunn wrote:
> On Tue, Apr 27, 2021 at 01:34:41AM +0200, Andrew Lunn wrote:
>> The datasheets suggests the 6161 uses a per port setting for jumbo
>> frames. Testing has however shown this is not correct, it uses the old
>> style chip wide MTU control. Change the ops in the 6161 structure to
>> reflect this.
>>
>> Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
>> Reported by: 曹煜 <cao88yu@gmail.com>
>> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> self NACK.
>
> We dug deeper and found a different real problem. Patches to follow.

Hi Andrew,

I'm back on-line now. Anything I can help look at?

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

* Re: [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU
  2021-05-03  2:38   ` Chris Packham
@ 2021-05-03 12:16     ` Andrew Lunn
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-05-03 12:16 UTC (permalink / raw)
  To: Chris Packham; +Cc: David Miller, 曹煜, netdev, Vivien Didelot

On Mon, May 03, 2021 at 02:38:14AM +0000, Chris Packham wrote:
> 
> On 1/05/21 2:01 am, Andrew Lunn wrote:
> > On Tue, Apr 27, 2021 at 01:34:41AM +0200, Andrew Lunn wrote:
> >> The datasheets suggests the 6161 uses a per port setting for jumbo
> >> frames. Testing has however shown this is not correct, it uses the old
> >> style chip wide MTU control. Change the ops in the 6161 structure to
> >> reflect this.
> >>
> >> Fixes: 1baf0fac10fb ("net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU")
> >> Reported by: 曹煜 <cao88yu@gmail.com>
> >> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > self NACK.
> >
> > We dug deeper and found a different real problem. Patches to follow.
> 
> Hi Andrew,
> 
> I'm back on-line now. Anything I can help look at?

Hi Chris

I have patches to post soon. I will include you in Cc:.

  Andrew

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

end of thread, other threads:[~2021-05-03 12:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 23:34 [PATCH net] dsa: mv88e6xxx: 6161: Use chip wide MAX MTU Andrew Lunn
2021-04-26 23:36 ` Andrew Lunn
2021-04-27  0:18   ` 曹煜
2021-04-27  1:35     ` Andrew Lunn
2021-04-30 14:01 ` Andrew Lunn
2021-05-03  2:38   ` Chris Packham
2021-05-03 12:16     ` 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).