diff options
author | Tomasz Lemiech <szpajder@staszic.waw.pl> | 2009-03-13 18:43:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-13 18:43:38 -0400 |
commit | 1f8ae0a21d83f43006d7f6d2862e921dbf2eeddd (patch) | |
tree | 36f744e3dda465f67d4bf5e2faab45ab14b791f4 /drivers/net/tulip/tulip.h | |
parent | a390d1f379cf821248b735f43d2e1147ebb8241d (diff) |
tulip: Fix for MTU problems with 802.1q tagged frames
The original patch was submitted last year but wasn't discussed or applied
because of missing maintainer's CCs. I only fixed some formatting errors,
but as I saw tulip is very badly formatted and needs further work.
Original description:
This patch fixes MTU problem, which occurs when using 802.1q VLANs. We
should allow receiving frames of up to 1518 bytes in length, instead of
1514.
Based on patch written by Ben McKeegan for 2.4.x kernels. It is archived
at http://www.candelatech.com/~greear/vlan/howto.html#tulip
I've adjusted a few things to make it apply on 2.6.x kernels.
Tested on D-Link DFE-570TX quad-fastethernet card.
Signed-off-by: Tomasz Lemiech <szpajder@staszic.waw.pl>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Ben McKeegan <ben@netservers.co.uk>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/tulip.h')
-rw-r--r-- | drivers/net/tulip/tulip.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h index 19abbc36b60a..0afa2d4f9472 100644 --- a/drivers/net/tulip/tulip.h +++ b/drivers/net/tulip/tulip.h | |||
@@ -201,8 +201,38 @@ enum desc_status_bits { | |||
201 | DescStartPkt = 0x20000000, | 201 | DescStartPkt = 0x20000000, |
202 | DescEndRing = 0x02000000, | 202 | DescEndRing = 0x02000000, |
203 | DescUseLink = 0x01000000, | 203 | DescUseLink = 0x01000000, |
204 | RxDescFatalErr = 0x008000, | 204 | |
205 | /* | ||
206 | * Error summary flag is logical or of 'CRC Error', 'Collision Seen', | ||
207 | * 'Frame Too Long', 'Runt' and 'Descriptor Error' flags generated | ||
208 | * within tulip chip. | ||
209 | */ | ||
210 | RxDescErrorSummary = 0x8000, | ||
211 | RxDescCRCError = 0x0002, | ||
212 | RxDescCollisionSeen = 0x0040, | ||
213 | |||
214 | /* | ||
215 | * 'Frame Too Long' flag is set if packet length including CRC exceeds | ||
216 | * 1518. However, a full sized VLAN tagged frame is 1522 bytes | ||
217 | * including CRC. | ||
218 | * | ||
219 | * The tulip chip does not block oversized frames, and if this flag is | ||
220 | * set on a receive descriptor it does not indicate the frame has been | ||
221 | * truncated. The receive descriptor also includes the actual length. | ||
222 | * Therefore we can safety ignore this flag and check the length | ||
223 | * ourselves. | ||
224 | */ | ||
225 | RxDescFrameTooLong = 0x0080, | ||
226 | RxDescRunt = 0x0800, | ||
227 | RxDescDescErr = 0x4000, | ||
205 | RxWholePkt = 0x00000300, | 228 | RxWholePkt = 0x00000300, |
229 | /* | ||
230 | * Top three bits of 14 bit frame length (status bits 27-29) should | ||
231 | * never be set as that would make frame over 2047 bytes. The Receive | ||
232 | * Watchdog flag (bit 4) may indicate the length is over 2048 and the | ||
233 | * length field is invalid. | ||
234 | */ | ||
235 | RxLengthOver2047 = 0x38000010 | ||
206 | }; | 236 | }; |
207 | 237 | ||
208 | 238 | ||