net: ethernet: mvneta: Add back interface mode validation
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 24 Jun 2020 07:00:45 +0000 (09:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:51:42 +0000 (14:51 -0700)
commit41c2b6b4f0f807803bb49f65835d136941a70f85
tree25576c3c545a02daa92c95d7f1d0bffd453c6047
parentd3d239dcb8aae6d7b10642d292b404e57604f7ea
net: ethernet: mvneta: Add back interface mode validation

When writing the serdes configuration register was moved to
mvneta_config_interface() the whole code block was removed from
mvneta_port_power_up() in the assumption that its only purpose was to
write the serdes configuration register. As mentioned by Russell King
its purpose was also to check for valid interface modes early so that
later in the driver we do not have to care for unexpected interface
modes.
Add back the test to let the driver bail out early on unhandled
interface modes.

Fixes: b4748553f53f ("net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c