linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "David S. Miller" <davem@davemloft.net>,
	linux-renesas-soc@vger.kernel.org
Cc: Chris Brandt <chris.brandt@renesas.com>
Subject: [PATCH RFT 3/5] sh_eth: check sh_eth_cpu_data::no_xdfar when dumping registers
Date: Mon, 3 Feb 2020 22:44:28 +0300	[thread overview]
Message-ID: <77fcb2d3-eaa2-c6c3-be87-50b8e4a46de3@cogentembedded.com> (raw)
In-Reply-To: <c643125b-5280-cd62-afc1-63b8a06501c1@cogentembedded.com>

When adding the sh_eth_cpu_data::no_xdfar flag I forgot to add the flag
check to  __sh_eth_get_regs(), causing the non-existing RDFAR/TDFAR to be
considered for dumping on the R-Car gen1/2 SoCs (the register offset check
has the final say here)...

Fixes: 4c1d45850d5 ("sh_eth: add sh_eth_cpu_data::cexcr flag")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -2140,11 +2140,13 @@ static size_t __sh_eth_get_regs(struct n
 	add_reg(EESR);
 	add_reg(EESIPR);
 	add_reg(TDLAR);
-	add_reg(TDFAR);
+	if (!cd->no_xdfar)
+		add_reg(TDFAR);
 	add_reg(TDFXR);
 	add_reg(TDFFR);
 	add_reg(RDLAR);
-	add_reg(RDFAR);
+	if (!cd->no_xdfar)
+		add_reg(RDFAR);
 	add_reg(RDFXR);
 	add_reg(RDFFR);
 	add_reg(TRSCER);

  parent reply	other threads:[~2020-02-03 19:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 19:34 [PATCH RFT 0/5] sh_eth: get rid of the dedicated regiseter mapping for RZ/A1 (R7S72100) Sergei Shtylyov
2020-02-03 19:40 ` [PATCH RFT 1/5] sh_eth: check sh_eth_cpu_data::no_tx_cntrs when dumping registers Sergei Shtylyov
2020-02-03 19:42 ` [PATCH RFT 2/5] sh_eth: check sh_eth_cpu_data::cexcr " Sergei Shtylyov
2020-02-03 19:44 ` Sergei Shtylyov [this message]
2020-02-03 19:49 ` [PATCH RFT 4/5] sh_eth: add sh_eth_cpu_data::gecmr flag Sergei Shtylyov
2020-02-03 19:51 ` [PATCH RFT 5/5] sh_eth: use Gigabit register map for R7S72100 Sergei Shtylyov
2020-02-03 20:01   ` Sergei Shtylyov
2020-02-04  3:35 ` [PATCH RFT 0/5] sh_eth: get rid of the dedicated regiseter mapping for RZ/A1 (R7S72100) Chris Brandt
2020-02-07 15:25 ` Chris Brandt
2020-02-07 15:40   ` Sergei Shtylyov
2020-02-07 15:51   ` Chris Brandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77fcb2d3-eaa2-c6c3-be87-50b8e4a46de3@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=chris.brandt@renesas.com \
    --cc=davem@davemloft.net \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).