net: thunderx: Fix OOPs with ethtool --register-dump
authorDavid Daney <david.daney@cavium.com>
Tue, 16 Aug 2016 20:30:36 +0000 (13:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2016 04:16:37 +0000 (21:16 -0700)
commit1423661fed2c40d6d71b5e2e3aa390f85157f9d5
tree8443105714495293e44f4c9daca2eeb87b52f645
parent039a392733600d35c80d406a98151b2a9a0a74b4
net: thunderx: Fix OOPs with ethtool --register-dump

The ethtool_ops .get_regs function attempts to read the nonexistent
register NIC_QSET_SQ_0_7_CNM_CHG, which produces a "bus error" type
OOPs.

Fix by not attempting to read, and removing the definition of,
NIC_QSET_SQ_0_7_CNM_CHG.  A zero is written into the register dump to
keep the layout unchanged.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: <stable@vger.kernel.org> # 4.4.x-
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nic_reg.h
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c