ia64/xen-unstable

changeset 15602:1158b6115b14

[HVM] Qemu rtl8139: correct ring-buffer wrapping.
The rx DMA should never overrun when it hits the end of a 64k buffer
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Jul 16 14:27:12 2007 +0100 (2007-07-16)
parents a0f90312844d
children d99903a98ad0
files tools/ioemu/hw/rtl8139.c
line diff
     1.1 --- a/tools/ioemu/hw/rtl8139.c	Mon Jul 16 10:36:52 2007 +0100
     1.2 +++ b/tools/ioemu/hw/rtl8139.c	Mon Jul 16 14:27:12 2007 +0100
     1.3 @@ -754,7 +754,7 @@ static void rtl8139_write_buffer(RTL8139
     1.4          int wrapped = MOD2(s->RxBufAddr + size, s->RxBufferSize);
     1.5  
     1.6          /* write packet data */
     1.7 -        if (wrapped && s->RxBufferSize < 65536 && !rtl8139_RxWrap(s))
     1.8 +        if (wrapped && !(s->RxBufferSize < 65536 && rtl8139_RxWrap(s)))
     1.9          {
    1.10              DEBUG_PRINT((">>> RTL8139: rx packet wrapped in buffer at %d\n", size-wrapped));
    1.11