net: phy: mscc-miim: reject clause 45 register accesses
authorMichael Walle <michael@walle.cc>
Tue, 5 Apr 2022 12:02:33 +0000 (14:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:19 +0000 (20:59 +0200)
commitfb45e80b2194ee6f615dfde4ab86da4144811126
treea2e8fc661235856f7ceba629514bcb63fcebeb5c
parent8ba8e1398a66c39dac2db9c4933bb7b1e11ecc96
net: phy: mscc-miim: reject clause 45 register accesses

[ Upstream commit 8d90991e5bf7fdb9f264f5f579d18969913054b7 ]

The driver doesn't support clause 45 register access yet, but doesn't
check if the access is a c45 one either. This leads to spurious register
reads and writes. Add the check.

Fixes: 542671fe4d86 ("net: phy: mscc-miim: Add MDIO driver")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/mdio/mdio-mscc-miim.c