net: fec: clear receive interrupts before processing a packet
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 2 Sep 2015 09:24:14 +0000 (17:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Oct 2015 11:49:14 +0000 (13:49 +0200)
commit5e06748086650d178186181c2bfe2518bb959fd5
tree2b3d51b4c54b54a8e6535c00f5141279cb21071d
parent8d14167cc854117c94f02f5ba612689869b3d9a4
net: fec: clear receive interrupts before processing a packet

[ Upstream commit ed63f1dcd5788d36f942fbcce350742385e3e18c ]

The patch just to re-submit the patch "db3421c114cfa6326" because the
patch "4d494cdc92b3b9a0" remove the change.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/fec_main.c