diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2020-02-15 23:08:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-16 19:44:41 -0800 |
commit | 6eaeedc1aa27a423bd89043705eca39215015bb3 (patch) | |
tree | ba53c7f2cfa1a44da41efb3a7d6610dc62cba1b2 /drivers/net/ethernet/renesas | |
parent | 5652b46e4e802910f5e06ac3ed66ee9853027b34 (diff) | |
download | linux-stable-6eaeedc1aa27a423bd89043705eca39215015bb3.tar.gz linux-stable-6eaeedc1aa27a423bd89043705eca39215015bb3.tar.bz2 linux-stable-6eaeedc1aa27a423bd89043705eca39215015bb3.zip |
sh_eth: check sh_eth_cpu_data::no_tx_cntrs when dumping registers
When adding the sh_eth_cpu_data::no_tx_cntrs flag I forgot to add the
flag check to __sh_eth_get_regs(), causing the non-existing TX counter
registers to be considered for dumping on the R7S72100 SoC (the register
offset sanity check has the final say here)...
Fixes: ce9134dff6d9 ("sh_eth: add sh_eth_cpu_data::no_tx_cntrs flag")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tested-by: Chris Brandt <chris.brandt@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 58ca126518a2..cd1f5842b131 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -2184,10 +2184,12 @@ static size_t __sh_eth_get_regs(struct net_device *ndev, u32 *buf) add_reg(BCULR); add_reg(MAHR); add_reg(MALR); - add_reg(TROCR); - add_reg(CDCR); - add_reg(LCCR); - add_reg(CNDCR); + if (!cd->no_tx_cntrs) { + add_reg(TROCR); + add_reg(CDCR); + add_reg(LCCR); + add_reg(CNDCR); + } add_reg(CEFCR); add_reg(FRECR); add_reg(TSFRCR); |