From f4a1bb22a59bba3f017cb673b0a53e05790c77a7 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Sep 27 2007 03:26:18 +0000 Subject: Fixed rtl8139 checksum calculation for Vista (rhbz #308201) --- diff --git a/qemu-0.9.0-rtl8139-checksum.patch b/qemu-0.9.0-rtl8139-checksum.patch new file mode 100644 index 0000000..4ee975c --- /dev/null +++ b/qemu-0.9.0-rtl8139-checksum.patch @@ -0,0 +1,47 @@ +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 diff --git a/qemu.spec b/qemu.spec index 5be581b..424c4b9 100644 --- a/qemu.spec +++ b/qemu.spec @@ -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 @@ Patch3: qemu-0.9.0-nic-defaults.patch 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 @@ As QEMU requires no host kernel patches to run, it is safe and easy to use. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p0 %build ./configure \ @@ -104,6 +108,9 @@ fi %{_mandir}/man1/* %changelog +* Wed Sep 26 2007 Daniel P. Berrange - 0.9.0-5.fc8 +- Fix rtl8139 checksum calculation for Vista (rhbz #308201) + * Tue Aug 28 2007 Daniel P. Berrange - 0.9.0-4.fc8 - Fix debuginfo by passing -Wl,--build-id to linker