Browse Source

[realtek] Allow extra space in RX buffers

Some hardware (observed with an onboard RTL8168) will erroneously
report a buffer overflow error if the received packet exactly fills
the receive buffer.

Fix by adding an extra four bytes of padding to each receive buffer.

Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
918fb43743
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/drivers/net/realtek.h

+ 2
- 1
src/drivers/net/realtek.h View File

@@ -226,7 +226,8 @@ enum realtek_legacy_status {
226 226
 #define RTL_NUM_RX_DESC 4
227 227
 
228 228
 /** Receive buffer length */
229
-#define RTL_RX_MAX_LEN ( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ )
229
+#define RTL_RX_MAX_LEN \
230
+	( ETH_FRAME_LEN + 4 /* VLAN */ + 4 /* CRC */ + 4 /* extra space */ )
230 231
 
231 232
 /** A Realtek descriptor ring */
232 233
 struct realtek_ring {

Loading…
Cancel
Save