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)
commit28b2d7d04b00150e2f06fa4ba9a99b9d2eb379bf
tree55e6dc7a064c9ae200f759d0a1c31fa8317ac528
parentda762863edd9e3f9b391620b845f2a6ffdc6dd7d
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: 0e6c4955e149 ("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