]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit639876a425bd01f3df2552e0aeaa4aea038d7eba
tree8443105714495293e44f4c9daca2eeb87b52f645
parent98c1f25c51e4a820751dc43e03f9da178f5e526b
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