aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-07-08 08:01:49 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-08 23:57:46 -0400
commitdb3421c114cfa6326861bc95e604785f4c64293b (patch)
tree059c5386f020cef7b71890b9b7d96000c4cd6e1f /drivers
parent36cdc743a320e78a5d12ca9765ec0f7d9f07b1f5 (diff)
net: fec: clear receive interrupts before processing a packet
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c2
1 files changed, 2 insertions, 0 deletions
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)
1184 if ((status & BD_ENET_RX_LAST) == 0) 1184 if ((status & BD_ENET_RX_LAST) == 0)
1185 netdev_err(ndev, "rcv is not +last\n"); 1185 netdev_err(ndev, "rcv is not +last\n");
1186 1186
1187 writel(FEC_ENET_RXF, fep->hwp + FEC_IEVENT);
1188
1187 /* Check for errors. */ 1189 /* Check for errors. */
1188 if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO | 1190 if (status & (BD_ENET_RX_LG | BD_ENET_RX_SH | BD_ENET_RX_NO |
1189 BD_ENET_RX_CR | BD_ENET_RX_OV)) { 1191 BD_ENET_RX_CR | BD_ENET_RX_OV)) {