43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
# HG changeset patch
|
|
# User Tim Deegan <Tim.Deegan@xensource.com>
|
|
# Date 1184592534 -3600
|
|
# Node ID d99903a98ad018c9aed180480577f56ce015fd30
|
|
# Parent 1158b6115b1413aa5d92ebe5b4ab2640eded40e3
|
|
[HVM] Qemu rtl8139: correct rx CRC calculation
|
|
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
|
|
|
|
Index: xen-3.1-testing/tools/ioemu/hw/rtl8139.c
|
|
===================================================================
|
|
--- xen-3.1-testing.orig/tools/ioemu/hw/rtl8139.c 2007-08-20 15:15:42.000000000 -0600
|
|
+++ xen-3.1-testing/tools/ioemu/hw/rtl8139.c 2007-08-20 15:15:43.000000000 -0600
|
|
@@ -53,9 +53,8 @@
|
|
/* debug RTL8139 card C+ mode only */
|
|
//#define DEBUG_RTL8139CP 1
|
|
|
|
-/* RTL8139 provides frame CRC with received packet, this feature seems to be
|
|
- ignored by most drivers, disabled by default */
|
|
-//#define RTL8139_CALCULATE_RXCRC 1
|
|
+/* Calculate CRCs propoerly on Rx packets */
|
|
+#define RTL8139_CALCULATE_RXCRC 1
|
|
|
|
/* Uncomment to enable on-board timer interrupts */
|
|
//#define RTL8139_ONBOARD_TIMER 1
|
|
@@ -1030,7 +1029,7 @@
|
|
|
|
/* write checksum */
|
|
#if defined (RTL8139_CALCULATE_RXCRC)
|
|
- val = cpu_to_le32(crc32(~0, buf, size));
|
|
+ val = cpu_to_le32(crc32(0, buf, size));
|
|
#else
|
|
val = 0;
|
|
#endif
|
|
@@ -1136,7 +1135,7 @@
|
|
|
|
/* write checksum */
|
|
#if defined (RTL8139_CALCULATE_RXCRC)
|
|
- val = cpu_to_le32(crc32(~0, buf, size));
|
|
+ val = cpu_to_le32(crc32(0, buf, size));
|
|
#else
|
|
val = 0;
|
|
#endif
|