Kaynağa Gözat

[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 12 yıl önce
ebeveyn
işleme
918fb43743
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2
    1
      src/drivers/net/realtek.h

+ 2
- 1
src/drivers/net/realtek.h Dosyayı Görüntüle

226
 #define RTL_NUM_RX_DESC 4
226
 #define RTL_NUM_RX_DESC 4
227
 
227
 
228
 /** Receive buffer length */
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
 /** A Realtek descriptor ring */
232
 /** A Realtek descriptor ring */
232
 struct realtek_ring {
233
 struct realtek_ring {

Loading…
İptal
Kaydet