rpms/qemu/devel qemu-0.9.0-rtl8139-checksum.patch, NONE, 1.1 qemu.spec, 1.28, 1.29

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


Author: berrange

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

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

qemu-0.9.0-rtl8139-checksum.patch:

--- NEW FILE qemu-0.9.0-rtl8139-checksum.patch ---
Index: hw/rtl8139.c
===================================================================
RCS file: /sources/qemu/qemu/hw/rtl8139.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- hw/rtl8139.c	11 Jul 2007 22:48:58 -0000	1.10
+++ hw/rtl8139.c	1 Aug 2007 13:10:29 -0000	1.11
@@ -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
@@ -747,7 +746,7 @@
         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));
 
@@ -1023,7 +1022,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
@@ -1129,7 +1128,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


Index: qemu.spec
===================================================================
RCS file: /cvs/extras/rpms/qemu/devel/qemu.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- qemu.spec	28 Aug 2007 17:45:53 -0000	1.28
+++ qemu.spec	27 Sep 2007 03:26:18 -0000	1.29
@@ -8,7 +8,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 0.9.0
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2+, LGPLv2+
 Group: Development/Tools
 URL: http://www.qemu.org/
@@ -23,7 +23,10 @@
 Patch4: qemu-0.9.0-vnc-authentication.patch
 # Fix RTL8139 MMIO regions. Remove at next upgrade
 Patch5: qemu-0.9.0-rtl8139-mmio-regions.patch
+# Fix Atapi errors with latest kernel
 Patch6: qemu-0.9.0-atapi-hsm.patch
+# Fix RTL8139 checksum calculations for Vista
+Patch7: qemu-0.9.0-rtl8139-checksum.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel compat-gcc-%{gccver} zlib-devel which texi2html gnutls-devel
 Requires(post): /sbin/chkconfig
@@ -53,6 +56,7 @@
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p0
 
 %build
 ./configure \
@@ -104,6 +108,9 @@
 %{_mandir}/man1/*
 
 %changelog
+* Wed Sep 26 2007 Daniel P. Berrange <berrange at redhat.com> - 0.9.0-5.fc8
+- Fix rtl8139 checksum calculation for Vista (rhbz #308201)
+
 * Tue Aug 28 2007 Daniel P. Berrange <berrange at redhat.com> - 0.9.0-4.fc8
 - Fix debuginfo by passing -Wl,--build-id to linker
 




More information about the fedora-extras-commits mailing list