net: fec: stop the "rcv is not +last, " error messages
authorTroy Kisky <troy.kisky@boundarydevices.com>
Fri, 5 Feb 2016 21:52:43 +0000 (14:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2016 11:14:51 +0000 (06:14 -0500)
Setting the FTRL register will stop the fec from
trying to use multiple receive buffers.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c

index 2106d72c91dc610fdf7b368e6dbf0a99c98c0a3d..cc9677ae70ab4811ee6405f3305e683cdc2cc70a 100644 (file)
@@ -64,6 +64,7 @@
 #define FEC_R_FIFO_RSEM                0x194 /* Receive FIFO section empty threshold */
 #define FEC_R_FIFO_RAEM                0x198 /* Receive FIFO almost empty threshold */
 #define FEC_R_FIFO_RAFL                0x19c /* Receive FIFO almost full threshold */
+#define FEC_FTRL               0x1b0 /* Frame truncation receive length*/
 #define FEC_RACC               0x1c4 /* Receive Accelerator function */
 #define FEC_RCMR_1             0x1c8 /* Receive classification match ring 1 */
 #define FEC_RCMR_2             0x1cc /* Receive classification match ring 2 */
index 41c81f6ec630a289c2c280ae068f429a8da9e21e..3e5b24ae537e41c74335dc93bd0a0e30b721d164 100644 (file)
@@ -988,6 +988,7 @@ fec_restart(struct net_device *ndev)
                        val &= ~FEC_RACC_OPTIONS;
                writel(val, fep->hwp + FEC_RACC);
        }
+       writel(PKT_MAXBUF_SIZE, fep->hwp + FEC_FTRL);
 #endif
 
        /*