Skip to contentSkip to conversation

net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports

PATCH Greg Ungerer 2 participants 5 messages May 24, 2019 – May 29, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Andrew,

I have a problem with a Marvell 6390 switch that I have bisected back to commit 7cbbee050c95, "[PATCH] net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports".

I have a Marvell 380 SoC based platform with a Marvell 6390 10 port switch, everything works with kernel 5.0 and older. As of 5.1 the switch ports no longer work - no packets are ever received and none get sent out.

The ports are probed and all discovered ok, they just don't work.

mv88e6085 f1072004.mdio-mii:10: switch 0x3900 detected: Marvell 88E6390, revision 1
libphy: mv88e6xxx SMI: probed
mv88e6085 f1072004.mdio-mii:10 lan1 (uninitialized): PHY [mv88e6xxx-1:01] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan2 (uninitialized): PHY [mv88e6xxx-1:02] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan3 (uninitialized): PHY [mv88e6xxx-1:03] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan4 (uninitialized): PHY [mv88e6xxx-1:04] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan5 (uninitialized): PHY [mv88e6xxx-1:05] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan6 (uninitialized): PHY [mv88e6xxx-1:06] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan7 (uninitialized): PHY [mv88e6xxx-1:07] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan8 (uninitialized): PHY [mv88e6xxx-1:08] driver [Marvell 88E6390]
DSA: tree 0 setup

Things like ethtool on the ports seem to work ok, reports link correctly. Configuring ports as part of a bridge or individually gets the same result.

Reverting just this single commit gets the ports working again with a linux-5.1 kernel.

Any ideas?

Regards
Greg

#1 lore raw
Quoted 25 lines · Greg Ungerer

Hi Andrew,

I have a problem with a Marvell 6390 switch that I have bisected back to commit 7cbbee050c95, "[PATCH] net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports".

I have a Marvell 380 SoC based platform with a Marvell 6390 10 port switch, everything works with kernel 5.0 and older. As of 5.1 the switch ports no longer work - no packets are ever received and none get sent out.

The ports are probed and all discovered ok, they just don't work.

mv88e6085 f1072004.mdio-mii:10: switch 0x3900 detected: Marvell 88E6390, revision 1
libphy: mv88e6xxx SMI: probed
mv88e6085 f1072004.mdio-mii:10 lan1 (uninitialized): PHY [mv88e6xxx-1:01] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan2 (uninitialized): PHY [mv88e6xxx-1:02] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan3 (uninitialized): PHY [mv88e6xxx-1:03] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan4 (uninitialized): PHY [mv88e6xxx-1:04] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan5 (uninitialized): PHY [mv88e6xxx-1:05] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan6 (uninitialized): PHY [mv88e6xxx-1:06] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan7 (uninitialized): PHY [mv88e6xxx-1:07] driver [Marvell 88E6390] mv88e6085 f1072004.mdio-mii:10 lan8 (uninitialized): PHY [mv88e6xxx-1:08] driver [Marvell 88E6390]
DSA: tree 0 setup

Quoted 2 lines

Things like ethtool on the ports seem to work ok, reports link correctly. Configuring ports as part of a bridge or individually gets the same result.

Hi Greg

DSA by default should configure the CPU port and DSA ports to there maximum speed. For port 10, that is 10Gbps. Your 380 cannot do that speed. So you need to tell the switch driver to slow down. Add a fixed link node to port ten, with speed 1000. You might also need to set the phy-mode to rgmii.

Can the 380 do 2500BaseX? There is work in progress to support this speed, so maybe next cycle you can change to that.

Andrew

#2 lore raw

Hi Andrew,

Thanks for the quick response.

Quoted 29 lines · Andrew Lunn
Quoted 25 lines · Greg Ungerer

Hi Andrew,

I have a problem with a Marvell 6390 switch that I have bisected back to commit 7cbbee050c95, "[PATCH] net: dsa: mv88e6xxx: Set correct interface mode for CPU/DSA ports".

I have a Marvell 380 SoC based platform with a Marvell 6390 10 port switch, everything works with kernel 5.0 and older. As of 5.1 the switch ports no longer work - no packets are ever received and none get sent out.

The ports are probed and all discovered ok, they just don't work.

   mv88e6085 f1072004.mdio-mii:10: switch 0x3900 detected: Marvell 88E6390, revision 1
   libphy: mv88e6xxx SMI: probed
   mv88e6085 f1072004.mdio-mii:10 lan1 (uninitialized): PHY [mv88e6xxx-1:01] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan2 (uninitialized): PHY [mv88e6xxx-1:02] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan3 (uninitialized): PHY [mv88e6xxx-1:03] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan4 (uninitialized): PHY [mv88e6xxx-1:04] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan5 (uninitialized): PHY [mv88e6xxx-1:05] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan6 (uninitialized): PHY [mv88e6xxx-1:06] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan7 (uninitialized): PHY [mv88e6xxx-1:07] driver [Marvell 88E6390]
   mv88e6085 f1072004.mdio-mii:10 lan8 (uninitialized): PHY [mv88e6xxx-1:08] driver [Marvell 88E6390]
   DSA: tree 0 setup
Quoted 2 lines

Things like ethtool on the ports seem to work ok, reports link correctly. Configuring ports as part of a bridge or individually gets the same result.

Quoted 7 lines

Hi Greg

DSA by default should configure the CPU port and DSA ports to there maximum speed. For port 10, that is 10Gbps. Your 380 cannot do that speed. So you need to tell the switch driver to slow down. Add a fixed link node to port ten, with speed 1000. You might also need to set the phy-mode to rgmii.

My hardware has the CPU port on 9, and it is SGMII. The existing working devicetree setup I used is:

                       port@9 {
                                reg = <9>;
                                label = "cpu";
                                ethernet = <&eth0>;
                                fixed-link {
                                        speed = <1000>;
                                        full-duplex;
                                };
                        };
Quoted 2 lines

Can the 380 do 2500BaseX? There is work in progress to support this speed, so maybe next cycle you can change to that.

That would be nice.

Regards
Greg

#3 lore raw
Quoted 12 lines

My hardware has the CPU port on 9, and it is SGMII. The existing working devicetree setup I used is:

                       port@9 {
                                reg = <9>;
                                label = "cpu";
                                ethernet = <&eth0>;
                                fixed-link {
                                        speed = <1000>;
                                        full-duplex;
                                };
                        };

Hi Greg

You might need to set the phy-mode to SGMII. I'm surprised you are using SGMII, not 1000Base-X. Do you have a PHY connected?

Andrew

#4 lore raw

Hi Andrew,

Quoted 13 lines · Andrew Lunn
Quoted 12 lines

My hardware has the CPU port on 9, and it is SGMII. The existing working devicetree setup I used is:

                        port@9 {
                                 reg = <9>;
                                 label = "cpu";
                                 ethernet = <&eth0>;
                                 fixed-link {
                                         speed = <1000>;
                                         full-duplex;
                                 };
                         };
Quoted 4 lines

Hi Greg

You might need to set the phy-mode to SGMII. I'm surprised you are using SGMII, not 1000Base-X. Do you have a PHY connected?

No, no PHY connected. Direct Armada 380 to 6390 switch with SGMII.

Adding

  phy-mode = "sgmii";

to that port fixes it.

Thanks!
Greg