diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2010-07-26 20:09:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-27 23:43:50 -0400 |
commit | 3eeb29972b1139f733f7269def527900729f4cc7 (patch) | |
tree | 7189feaee380e0921c65935879e65030b01d9560 /drivers/net/stmmac/enh_desc.c | |
parent | ca09c9760101b607cd2282c45b342655e26fa683 (diff) |
stmmac: fix automatic PAD/FCS stripping
For Simple Ethernet frames (802.2 and 802.3) the GMAC Core
never strips pad and fcs. This means the ACS has no effect
on IPv4/6 frames.
The FL bits, in the RDES0, include the FCS so the driver
has to remove it in SW.
For 802.3 frame format with LLC or LLC-SNAP, when set the ACS
bit, the HW strips both PAD and FCS.
The FL bits, in the RDES0, actually represents the frame length
already stripped.
This patch fixes this logic within the device driver that
erroneously removed 4byte from 802.3 frames already stripped
corrupting the payload.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/enh_desc.c')
-rw-r--r-- | drivers/net/stmmac/enh_desc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/stmmac/enh_desc.c b/drivers/net/stmmac/enh_desc.c index 3c18ebece043..f612f986a7e1 100644 --- a/drivers/net/stmmac/enh_desc.c +++ b/drivers/net/stmmac/enh_desc.c | |||
@@ -123,7 +123,7 @@ static int enh_desc_coe_rdes0(int ipc_err, int type, int payload_err) | |||
123 | */ | 123 | */ |
124 | if (status == 0x0) { | 124 | if (status == 0x0) { |
125 | CHIP_DBG(KERN_INFO "RX Des0 status: IEEE 802.3 Type frame.\n"); | 125 | CHIP_DBG(KERN_INFO "RX Des0 status: IEEE 802.3 Type frame.\n"); |
126 | ret = good_frame; | 126 | ret = llc_snap; |
127 | } else if (status == 0x4) { | 127 | } else if (status == 0x4) { |
128 | CHIP_DBG(KERN_INFO "RX Des0 status: IPv4/6 No CSUM errorS.\n"); | 128 | CHIP_DBG(KERN_INFO "RX Des0 status: IPv4/6 No CSUM errorS.\n"); |
129 | ret = good_frame; | 129 | ret = good_frame; |