diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index b79d78fd6e7a..c30270168bec 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -72,12 +72,34 @@ static void set_multicast_list(struct net_device *ndev); #define DRIVER_NAME "fec" -/* Pause frame feild and FIFO threshold */ +/* Pause frame field and FIFO threshold */ #define FEC_ENET_FCE (1 << 5) -#define FEC_ENET_RSEM_V 0x84 +/* + * RSEM: the FIFO threshold in 64-bit words (from zero bytes) at which + * XOFF will be sent. Minimum 0, maximum possible 255. + * RAFL: the number of remaining 64-bit words in the FIFO at which the + * frame is marked with overrun. Minimum 4, maximum possible 255. + * + * When XOFF is sent, the link partner should continue sending any + * packet currently in progress, and then pause transmission for the + * specified duration. It should not terminate transmission of the + * packet. + * + * The FIFO can store the full frame and the FCS value, which on standard + * Ethernet is 1518 bytes, or 190 FIFO entries. However, we do not know + * the size of the receive FIFO, so we are unable to properly calculate + * the thresholds. + * + * Practical tests with 1514 byte ethernet packets show that with + * RSEM = 132, RAFL = 8, we see a large quantity of overflowed UDP packets. + * Reducing RAFL to 4 has almost no effect. Reducing RSEM to 78 gives us + * a small number of overflow errors, and at 77 it gives only a single + * error per UDP iperf run. + */ +#define FEC_ENET_RSEM_V 77 #define FEC_ENET_RSFL_V 16 #define FEC_ENET_RAEM_V 0x8 -#define FEC_ENET_RAFL_V 0x8 +#define FEC_ENET_RAFL_V 4 #define FEC_ENET_OPD_V 0xFFF0 /* Controller is ENET-MAC */ |