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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2016 08:07:39 +0000 (10:07 +0200)
commite43dccac6393653706ef7486d3261f21563cf997
treed47d1666d0eb0918a39e75861bd919782fc9e12f
parentcfcbd5b85eab2c977cad92289453d25f77d3cdd7
net: thunderx: Fix OOPs with ethtool --register-dump

commit 1423661fed2c40d6d71b5e2e3aa390f85157f9d5 upstream.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cavium/thunder/nic_reg.h
drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c