linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: netdev@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Subject: [PATCH 1/3] sh_eth: handle only enabled E-MAC interrupts
Date: Wed, 04 Jan 2017 15:10:21 +0300	[thread overview]
Message-ID: <3040246.Jqm8G9qTbW@wasted.cogentembedded.com> (raw)
In-Reply-To: <64514012.uUvlhX0YRQ@wasted.cogentembedded.com>

The driver should only handle the enabled E-MAC interrupts, like it does
for the E-DMAC interrupts since commit 3893b27345ac ("sh_eth: workaround
for spurious ECI interrupt"),  so mask ECSR with  ECSIPR when reading it
in sh_eth_error().

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: renesas/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- renesas.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ renesas/drivers/net/ethernet/renesas/sh_eth.c
@@ -1535,7 +1535,8 @@ static void sh_eth_error(struct net_devi
 	u32 mask;
 
 	if (intr_status & EESR_ECI) {
-		felic_stat = sh_eth_read(ndev, ECSR);
+		felic_stat = sh_eth_read(ndev, ECSR) &
+			     sh_eth_read(ndev, ECSIPR);
 		sh_eth_write(ndev, felic_stat, ECSR);	/* clear int */
 		if (felic_stat & ECSR_ICD)
 			ndev->stats.tx_carrier_errors++;

  reply	other threads:[~2017-01-04 12:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 12:09 [PATCH 0/2] sh_eth: E-MAC interrupt handler cleanups Sergei Shtylyov
2017-01-04 12:10 ` Sergei Shtylyov [this message]
2017-01-04 12:10 ` [PATCH 2/3] sh_eth: no need for *else* after *goto* Sergei Shtylyov
2017-01-04 12:11 ` [PATCH 3/3] sh_eth: factor out sh_eth_emac_interrupt() Sergei Shtylyov
2017-01-04 12:13   ` Sergei Shtylyov
2017-01-04 12:20     ` Sergei Shtylyov
2017-01-04 18:48 ` [PATCH 0/2] sh_eth: E-MAC interrupt handler cleanups David Miller

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=3040246.Jqm8G9qTbW@wasted.cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@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).