]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: fix XPB register reads in debug dump
authorCarl Heymann <carl.heymann@netronome.com>
Thu, 14 Dec 2017 09:50:26 +0000 (10:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2017 17:48:45 +0000 (12:48 -0500)
commitde33e54a6e069e4722853bd8e2a7a7613ff6ff0b
tree55e6dc7a064c9ae200f759d0a1c31fa8317ac528
parentf258ad6cf33f5574cb7e81cb086c50213b5985bb
nfp: fix XPB register reads in debug dump

For XPB registers reads, some island IDs require special handling (e.g.
ARM island), which is already taken care of in nfp_xpb_readl(), so use
that instead of a straight CPP read.

Without this fix all "xpbm:ArmIsldXpbmMap.*" registers are reported as
0xffffffff. It has also been observed to cause a system reboot.

With this fix correct values are reported, none of which are 0xffffffff.

The values may be read using ethtool debug level 2.
 # ethtool -W <netdev> 2
 # ethtool -w <netdev> data dump.dat

Fixes: 342e0e39a994 ("nfp: dump CPP, XPB and direct ME CSRs")
Signed-off-by: Carl Heymann <carl.heymann@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_debugdump.c