rpms/xen/F-7 xen-qemu-rtl8139-checksum.patch, NONE, 1.1 xen.spec, 1.186, 1.187

Daniel P. Berrange (berrange) fedora-extras-commits at redhat.com
Thu Sep 27 03:38:24 UTC 2007


Author: berrange

Update of /cvs/pkgs/rpms/xen/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2067

Modified Files:
	xen.spec 
Added Files:
	xen-qemu-rtl8139-checksum.patch 
Log Message:
Fixed rtl8139 checksum calculation for Vista (rhbz #308201)

xen-qemu-rtl8139-checksum.patch:

--- NEW FILE xen-qemu-rtl8139-checksum.patch ---
diff -rup xen-3.1.0-src.orig/tools/ioemu/hw/rtl8139.c xen-3.1.0-src.new/tools/ioemu/hw/rtl8139.c
--- xen-3.1.0-src.orig/tools/ioemu/hw/rtl8139.c	2007-05-18 10:45:21.000000000 -0400
+++ xen-3.1.0-src.new/tools/ioemu/hw/rtl8139.c	2007-09-26 23:25:22.000000000 -0400
@@ -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 properly on Rx packets */
+#define RTL8139_CALCULATE_RXCRC 1
 
 /* Uncomment to enable on-board timer interrupts */
 //#define RTL8139_ONBOARD_TIMER 1
@@ -754,7 +753,7 @@ static void rtl8139_write_buffer(RTL8139
         int wrapped = MOD2(s->RxBufAddr + size, s->RxBufferSize);
 
         /* write packet data */
-        if (wrapped && s->RxBufferSize < 65536 && !rtl8139_RxWrap(s))
+        if (wrapped && !(s->RxBufferSize < 65536 && rtl8139_RxWrap(s)))
         {
             DEBUG_PRINT((">>> RTL8139: rx packet wrapped in buffer at %d\n", size-wrapped));
 
@@ -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


Index: xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xen/F-7/xen.spec,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -r1.186 -r1.187
--- xen.spec	26 Sep 2007 16:38:46 -0000	1.186
+++ xen.spec	27 Sep 2007 03:37:52 -0000	1.187
@@ -3,7 +3,7 @@
 Summary: Xen is a virtual machine monitor
 Name:    xen
 Version: 3.1.0
-Release: 6%{dist}
+Release: 7%{dist}
 Group:   Development/Libraries
 License: GPL
 URL:     http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html
@@ -27,6 +27,7 @@
 Patch32: xen-clobber-vif-type.patch
 Patch33: xen-vmxassist-irqs.patch
 Patch34: xen-3.1.0-no-xenapi-docs.patch
+Patch35: xen-qemu-rtl8139-checksum.patch
 
 # Patches to modify the default config of xend
 Patch100: xen-config-dom0-minmem.patch
@@ -136,6 +137,7 @@
 %patch32 -p1
 %patch33 -p1
 %patch34 -p1
+%patch35 -p1
 
 # config patches
 %patch100 -p1
@@ -289,6 +291,9 @@
 %{_libdir}/*.a
 
 %changelog
+* Wed Sep 26 2007 Daniel P. Berrange <berrange at redhat.com> - 3.1.0-7.fc7
+- Fixed rtl8139 checksum calculation for Vista (rhbz #308201)
+
 * Wed Sep 26 2007 Chris Lalancette <clalance at redhat.com> - 3.1.0-6.fc7
 - QEmu NE2000 overflow check - CVE-2007-1321
 - Pygrub guest escape - CVE-2007-4993




More information about the fedora-extras-commits mailing list