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 19:01:06 +0000 (21:01 +0200)
commitb7893388bb888cb15c7db0c0f71bd58a4fb5312c
tree68d0f6ba4e2b3f49412e5916ada07f4c059c9f87
parent08ff0e74fab517dbc44e11b8bc683dd4ecc65950
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