net: dsa: felix: add functionality when not all ports are supported
authorColin Foster <colin.foster@in-advantage.com>
Fri, 27 Jan 2023 19:35:54 +0000 (11:35 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 31 Jan 2023 05:07:20 +0000 (21:07 -0800)
commitde879a016a94a670fafeb3eb03b3d5803d81ab37
tree407439c49f2306b84e492bba044e5a1f23b3279c
parentdc454fa4b764ab75038e822dfc9a1b2526757a63
net: dsa: felix: add functionality when not all ports are supported

When the Felix driver would probe the ports and verify functionality, it
would fail if it hit single port mode that wasn't supported by the driver.

The initial case for the VSC7512 driver will have physical ports that
exist, but aren't supported by the driver implementation. Add the
OCELOT_PORT_MODE_NONE macro to handle this scenario, and allow the Felix
driver to continue with all the ports that are currently functional.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c
drivers/net/dsa/ocelot/felix.h