summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fec.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-04-01 23:06:09 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-10-17 14:34:50 +0100
commit313c7fd3bb73c5ff942d48020bd6e3cc11a4f935 (patch)
tree14bf10f47cca05fb190901eb90ec7ee26641b048 /drivers/net/ethernet/freescale/fec.h
parentbfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff)
net: fec: fix receive error handling
The FEC receive error handling suffers from several problems: 1. When a FIFO overrun error occurs, the descriptor is closed and reception stops. The remainder of the packet is discarded by the MAC. The documentation states that other status bits are invalid, and they will be zero. However, practical experience on iMX6 shows this is not the case - the CR (crc error) bit will also be set. This leads to each FIFO overrun event incrementing both the fifo error count and the crc error count, which makes the error statistics less useful. Fix this by ignoring all other status bits of the FIFO overrun is set, and add a comment to that effect. 2. A late collision invalidates all but the overrun condition; the remaining error conditions must be ignored. 3. Despite accounting for errors, it continues to receive the errored packets and pass them into the network stack as if they were correctly received. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec.h')
-rw-r--r--drivers/net/ethernet/freescale/fec.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h
index ee41d98b44b6..ec4c76264eb9 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -202,6 +202,7 @@ struct bufdesc_ex {
#define BD_ENET_RX_OV ((ushort)0x0002)
#define BD_ENET_RX_CL ((ushort)0x0001)
#define BD_ENET_RX_STATS ((ushort)0x013f) /* All status bits */
+#define BD_ENET_RX_ERROR ((ushort)0x003f)
/* Enhanced buffer descriptor control/status used by Ethernet receive */
#define BD_ENET_RX_VLAN 0x00000004