ia64/xen-unstable

changeset 15603:d99903a98ad0

[HVM] Qemu rtl8139: correct rx CRC calculation
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Jul 16 14:28:54 2007 +0100 (2007-07-16)
parents 1158b6115b14
children 23dab4b05455
files tools/ioemu/hw/rtl8139.c
line diff
     1.1 --- a/tools/ioemu/hw/rtl8139.c	Mon Jul 16 14:27:12 2007 +0100
     1.2 +++ b/tools/ioemu/hw/rtl8139.c	Mon Jul 16 14:28:54 2007 +0100
     1.3 @@ -53,9 +53,8 @@
     1.4  /* debug RTL8139 card C+ mode only */
     1.5  //#define DEBUG_RTL8139CP 1
     1.6  
     1.7 -/* RTL8139 provides frame CRC with received packet, this feature seems to be
     1.8 -   ignored by most drivers, disabled by default */
     1.9 -//#define RTL8139_CALCULATE_RXCRC 1
    1.10 +/* Calculate CRCs propoerly on Rx packets */
    1.11 +#define RTL8139_CALCULATE_RXCRC 1
    1.12  
    1.13  /* Uncomment to enable on-board timer interrupts */
    1.14  //#define RTL8139_ONBOARD_TIMER 1
    1.15 @@ -1030,7 +1029,7 @@ static void rtl8139_do_receive(void *opa
    1.16  
    1.17          /* write checksum */
    1.18  #if defined (RTL8139_CALCULATE_RXCRC)
    1.19 -        val = cpu_to_le32(crc32(~0, buf, size));
    1.20 +        val = cpu_to_le32(crc32(0, buf, size));
    1.21  #else
    1.22          val = 0;
    1.23  #endif
    1.24 @@ -1136,7 +1135,7 @@ static void rtl8139_do_receive(void *opa
    1.25  
    1.26          /* write checksum */
    1.27  #if defined (RTL8139_CALCULATE_RXCRC)
    1.28 -        val = cpu_to_le32(crc32(~0, buf, size));
    1.29 +        val = cpu_to_le32(crc32(0, buf, size));
    1.30  #else
    1.31          val = 0;
    1.32  #endif