netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] sh_eth: fix misreporting of transmit abort
@ 2013-06-20 21:13 Sergei Shtylyov
  2013-06-24  7:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2013-06-20 21:13 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Due to obviously missing braces, EESR.TABT (transmit abort) interrupt may be
reported even if it hasn't happened, just when EESR.TWB (transmit descriptor
write-back) interrupt happens. Luckily (?), EESR.TWB is disabled by the driver
via the TRIMD register and all the interrupt masks, so that transmit abort is
never actually logged...

Put the braces where they should be and fix the incoherent comment, while at it. 

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

---
The patch is against Dave Miller's 'net.git' repo. Maybe it should be merged to
the 'net-next.git' repo instead, it's up to Dave to decide. The same can be said
about whether this should be merged to -stable...

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

Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net/drivers/net/ethernet/renesas/sh_eth.c
@@ -1550,11 +1550,12 @@ static void sh_eth_error(struct net_devi
 
 ignore_link:
 	if (intr_status & EESR_TWB) {
-		/* Write buck end. unused write back interrupt */
-		if (intr_status & EESR_TABT)	/* Transmit Abort int */
+		/* Unused write back interrupt */
+		if (intr_status & EESR_TABT) {	/* Transmit Abort int */
 			ndev->stats.tx_aborted_errors++;
 			if (netif_msg_tx_err(mdp))
 				dev_err(&ndev->dev, "Transmit Abort\n");
+		}
 	}
 
 	if (intr_status & EESR_RABT) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] sh_eth: fix misreporting of transmit abort
  2013-06-20 21:13 [PATCH 2/2] sh_eth: fix misreporting of transmit abort Sergei Shtylyov
@ 2013-06-24  7:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-06-24  7:10 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Fri, 21 Jun 2013 01:13:42 +0400

> Due to obviously missing braces, EESR.TABT (transmit abort) interrupt may be
> reported even if it hasn't happened, just when EESR.TWB (transmit descriptor
> write-back) interrupt happens. Luckily (?), EESR.TWB is disabled by the driver
> via the TRIMD register and all the interrupt masks, so that transmit abort is
> never actually logged...
> 
> Put the braces where they should be and fix the incoherent comment, while at it. 
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Also applied to 'net'.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-24  7:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20 21:13 [PATCH 2/2] sh_eth: fix misreporting of transmit abort Sergei Shtylyov
2013-06-24  7:10 ` David Miller

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).