linux/drivers/net/ethernet/freescale
Claudiu Manoil f5b720b859 gianfar: Add FCS to rx buffer size (fix)
For each Rx frame the eTSEC writes its FCS (Frame Check Sequence)
to the Rx buffer.

The eTSEC h/w manual states in the "Receive Buffer Descriptor Field
Descriptions" table:
"Data length is the number of octets written by the eTSEC into this BD's
data buffer if L is cleared (the value is equal to MRBLR), or, if L is
set, the length of the frame including *CRC*, FCB (if RCTRL[PRSDEP > 00),
preamble (if MACCFG2[PreAmRxEn]=1), time stamp (if RCTRL[TS] = 1) and
any padding (RCTRL[PAL])."

Though the FCS bytes are removed by the driver before passing the skb
to the net stack, the Rx buffer size computation does not currently
take into account the FCS bytes (4 bytes).
Because the Rx buffer size is multiple of 512 bytes, leaving out the
FCS is not a problem for the default MTU of 1500, as the Rx buffer size
is 1536 in this case.  However, for custom MTUs, where the difference
between the MTU size and the Rx buffer size is less, this can be a
problem as the computed Rx buffer size won't be enough to accomodate
the FCS for a received frame that is big enough (close to MTU size).
In such case the received frame is considered to be incomplete (L flag
not set in the RxBD status) and silently dropped.

Note that the driver does not currently support S/G on Rx, so it has to
compute its Rx buffer size based on the MTU of the device.

Reported-by: Kristian Otnes <kotnes@cisco.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-15 16:53:50 -04:00
..
fs_enet net: fs_enet: error: 'SCCE_ENET_TXF' undeclared 2014-10-10 00:51:24 -04:00
fec_main.c net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fec_mpc52xx_phy.c net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata() 2013-08-21 12:27:04 -07:00
fec_mpc52xx.c fec_mpc52xx: delete unneeded test before of_node_put 2014-08-08 10:28:08 -07:00
fec_mpc52xx.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
fec_ptp.c net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fec.h net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fsl_pq_mdio.c net/fsl_pq_mdio: Replace spin_event_timeout() with arch independent 2014-10-09 01:40:37 -04:00
gianfar_ethtool.c gianfar: Check if phydev present on ethtool -A 2014-04-24 13:36:16 -04:00
gianfar_ptp.c ptp: drivers: set the number of programmable pins. 2014-03-21 14:21:14 -04:00
gianfar.c gianfar: Add FCS to rx buffer size (fix) 2014-10-15 16:53:50 -04:00
gianfar.h gianfar: Replace eieio with wmb for non-PPC archs 2014-10-09 01:40:37 -04:00
Kconfig net/fsl: xgmac_mdio is dependent on OF_MDIO 2014-06-11 15:50:59 -07:00
Makefile gianfar: Remove sysfs stubs for FIFOCFG and stashing 2014-02-18 15:03:02 -05:00
ucc_geth_ethtool.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ucc_geth.c net: ucc_geth: fix build failure 2014-08-10 21:40:15 -07:00
ucc_geth.h net: remove skb recycling 2012-10-07 00:40:54 -04:00
xgmac_mdio.c net/fsl: Add format length modifier to avoid negative values 2014-07-30 19:58:09 -07:00