]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: microchip: Always set regmap stride to 1
authorMarek Vasut <marex@denx.de>
Wed, 25 Sep 2019 22:08:42 +0000 (00:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 18:21:07 +0000 (20:21 +0200)
commit5fa8a5e5ac40139cf6c68e081077f316a80836dc
treed919147ab33e385154001904fc0dfe4d156c65a3
parentf49532cfb380126420c61cdb6722b50dc968e1a6
net: dsa: microchip: Always set regmap stride to 1

The regmap stride is set to 1 for regmap describing 8bit registers already.
However, for 16/32/64bit registers, the stride is 2/4/8 respectively. This
is not correct, as the switch protocol supports unaligned register reads
and writes and the KSZ87xx even uses such unaligned register accesses to
read e.g. MIB counter.

This patch fixes MIB counter access on KSZ87xx.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: David S. Miller <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: George McCollister <george.mccollister@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: Woojung Huh <woojung.huh@microchip.com>
Fixes: 3007c9c4d755 ("net: dsa: microchip: Initial SPI regmap support")
Fixes: 55a32216b7e2 ("net: dsa: microchip: Factor out regmap config generation into common header")
Reviewed-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.h