Re: [PATCH net-next 2/2] net: dsa: mv88e6xxx: enable support for 88E6361 switch

From: Andrew Lunn
Date: Wed May 17 2023 - 16:51:31 EST


On Wed, May 17, 2023 at 10:34:30PM +0200, alexis.lothore@xxxxxxxxxxx wrote:
> From: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx>
>
> Marvell 88E6361 is an 8-port switch derived from the
> 88E6393X/88E9193X/88E6191X switches family. It can benefit from the
> existing mv88e6xxx driver by simply adding the proper switch description in
> the driver. Main differences with other switches from this
> family are:
> - 8 ports exposed (instead of 11): ports 1, 2 and 8 not available
> - No 5GBase-x nor SFI/USXGMII support

So what exactly is supported for link modes?

The way you reuse the 6393 ops, are these differences actually
enforced? It looks like mv88e6393x_phylink_get_caps() will allow
2500BaseX, 5GBaseX and 10GBaseR for port 10.

> + [MV88E6361] = {
> + .prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6361,
> + .family = MV88E6XXX_FAMILY_6393,
> + .name = "Marvell 88E6361",
> + .num_databases = 4096,
> + .num_macs = 16384,
> + .num_ports = 11,
> + /* Ports 1, 2 and 8 are not routed */
> + .invalid_port_mask = BIT(1) | BIT(2) | BIT(8),
> + .num_internal_phys = 5,

Which ports have internal PHYs? 2, 3, 4, 5, 6, 7 ? What does
mv88e6xxx_phy_is_internal() return for these ports, and
mv88e6xxx_get_capsmv88e6xxx_get_caps()? I'm wondering if you actually
need to list 8 here?

Andrew