linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rmk+kernel@arm.linux.org.uk (Russell King)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH C 3/7] net: fec: clear receive interrupts before processing a packet
Date: Tue, 08 Jul 2014 13:01:49 +0100	[thread overview]
Message-ID: <E1X4U5l-0005u5-4g@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20140708120117.GJ21766@n2100.arm.linux.org.uk>

Clear any pending receive interrupt before we process a pending packet.
This helps to avoid any spurious interrupts being raised after we have
fully cleaned the receive ring, while still allowing an interrupt to be
raised if we receive another packet.

The position of this is critical: we must do this prior to reading the
next packet status to avoid potentially dropping an interrupt when a
packet is still pending.

Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/net/ethernet/freescale/fec_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index b2ae7e706d5e..79d578d6db8a 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1184,6 +1184,8 @@ fec_enet_rx(struct net_device *ndev, int budget)
 		if ((status & BD_ENET_RX_LAST) == 0)
 			netdev_err(ndev, "rcv is not +last\n");
 
+		writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
+
 		/* Check for errors. */
 		if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
 			   BD_ENET_RX_CR | BD_ENET_RX_OV)) {
-- 
1.8.3.1

  parent reply	other threads:[~2014-07-08 12:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 12:01 [PATCH C 0/7] Freescale ethernet driver updates (part 3) Russell King - ARM Linux
2014-07-08 12:01 ` [PATCH C 1/7] net: fec: better implementation of iMX6 ERR006358 quirk Russell King
2014-07-08 12:01 ` [PATCH C 2/7] net: fec: replace delayed work with standard work Russell King
2014-07-08 12:01 ` Russell King [this message]
2014-07-08 12:01 ` [PATCH C 4/7] net: fec: reorder ethtool ops to match order in struct declaration Russell King
2014-07-08 12:01 ` [PATCH C 5/7] net: fec: add support for dumping transmit ring on timeout Russell King
2014-07-08 12:02 ` [PATCH C 6/7] net: fec: remove useless status check in tx reap path Russell King
2014-07-08 12:02 ` [PATCH C 7/7] net: fec: consolidate hwtstamp implementation Russell King
2014-07-09  3:58 ` [PATCH C 0/7] Freescale ethernet driver updates (part 3) David Miller
2014-07-09  9:30 ` [PATCH C 1/7] net: fec: better implementation of iMX6 ERR006358 quirk Russell King
2014-07-09  9:33   ` Russell King - ARM Linux

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=E1X4U5l-0005u5-4g@rmk-PC.arm.linux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).