Преглед на файлове

[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 години
родител
ревизия
918fb43743
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2
    1
      src/drivers/net/realtek.h

+ 2
- 1
src/drivers/net/realtek.h Целия файл

@@ -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…
Отказ
Запис