net: mvpp2: fix phylink handling of invalid PHY modes
authorBaruch Siach <baruch@tkos.co.il>
Tue, 4 Dec 2018 14:03:53 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Dec 2018 13:15:22 +0000 (14:15 +0100)
commite6a57a90b37140cc0c764f268f568660f0b9c70b
treeeda69c640745d346e764ff0a2b7ddd503252c87e
parentf124acc92c839a862fb46a6cf049017f389a7637
net: mvpp2: fix phylink handling of invalid PHY modes

[ Upstream commit 0fb628f0f250c74b1023edd0ca4a57c8b35b9b2c ]

The .validate phylink callback should empty the supported bitmap when
the interface mode is invalid.

Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>
Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c