# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1184592534 -3600
# Node ID d99903a98ad018c9aed180480577f56ce015fd30
# Parent 1158b6115b1413aa5d92ebe5b4ab2640eded40e3
[HVM] Qemu rtl8139: correct rx CRC calculation
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
tools/ioemu/hw/rtl8139.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff -r 1158b6115b14 -r d99903a98ad0 tools/ioemu/hw/rtl8139.c
--- a/tools/ioemu/hw/rtl8139.c Mon Jul 16 14:27:12 2007 +0100
+++ b/tools/ioemu/hw/rtl8139.c Mon Jul 16 14:28:54 2007 +0100
@@ -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 @@ static void rtl8139_do_receive(void *opa
/* 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 @@ static void rtl8139_do_receive(void *opa
/* 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
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|