rpms/kvm/devel kvm-rtl8139-checksum.patch, NONE, 1.1 kvm.spec, 1.26, 1.27

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


Author: berrange

Update of /cvs/extras/rpms/kvm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv740

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

kvm-rtl8139-checksum.patch:

--- NEW FILE kvm-rtl8139-checksum.patch ---
diff -rup kvm-35.orig/qemu/hw/rtl8139.c kvm-35.new/qemu/hw/rtl8139.c
--- kvm-35.orig/qemu/hw/rtl8139.c	2007-09-26 19:49:44.000000000 -0400
+++ kvm-35.new/qemu/hw/rtl8139.c	2007-09-26 19:50:08.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: kvm.spec
===================================================================
RCS file: /cvs/extras/rpms/kvm/devel/kvm.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- kvm.spec	24 Sep 2007 18:21:27 -0000	1.26
+++ kvm.spec	27 Sep 2007 03:04:28 -0000	1.27
@@ -1,8 +1,8 @@
 Summary: Kernel-based Virtual Machine
 Name: kvm
 Version: 36
-Release: 5%{?dist}
-License: GPLv2 and LGPLv2
+Release: 6%{?dist}
+License: GPLv2+, LGPLv2+
 Group: Development/Tools
 URL: http://kvm.sf.net
 Source0: http://download.sourceforge.net/sourceforge/kvm/kvm-%{version}.tar.gz
@@ -14,6 +14,7 @@
 Patch101: kvm-rtl8139-mmio-regions.patch
 Patch102: qemu-atapi-hsm.patch
 Patch103: qemu-0.9.0-vnc-authentication.patch
+Patch104: kvm-rtl8139-checksum.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel 
 # to build the bios
@@ -48,6 +49,7 @@
 %patch101 -p1
 %patch102 -p0
 %patch103 -p1 -b .vnc
+%patch104 -p1
 
 %build
 LDFLAGS=-Wl,--build-id ./configure --with-patched-kernel --qemu-cc=gcc34 --kerneldir=$(pwd)/kernel --prefix=%{_prefix}
@@ -95,6 +97,9 @@
 %{_sysconfdir}/sysconfig/modules/kvm.modules
 
 %changelog
+* Wed Sep 26 2007 Daniel P. Berrange <berrange at redhat.com> - 36-6.fc8
+- Fixed rtl8139 checksum calculation for Vista (rhbz #308201)
+
 * Mon Sep 24 2007 Jeremy Katz <katzj at redhat.com> - 36-5
 - fix build on x86_64
 




More information about the fedora-extras-commits mailing list