net: dsa: microchip: Fix ksz_read64()
authorBen Hutchings <ben.hutchings@mind.be>
Mon, 9 Aug 2021 22:59:12 +0000 (00:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Aug 2021 06:59:11 +0000 (08:59 +0200)
commitccc1fe82c87858a0543fd5afa784086fe0512040
tree4ed12dfc29df08353a645e1b4740b0effd71dda2
parent558092b8ed31add3a2c681cf79289f0ae28fafb4
net: dsa: microchip: Fix ksz_read64()

[ Upstream commit c34f674c8875235725c3ef86147a627f165d23b4 ]

ksz_read64() currently does some dubious byte-swapping on the two
halves of a 64-bit register, and then only returns the high bits.
Replace this with a straightforward expression.

Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/microchip/ksz_common.h