diff options
Diffstat (limited to 'system/qemu/patches/qemu_pcnet.patch')
-rw-r--r-- | system/qemu/patches/qemu_pcnet.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/system/qemu/patches/qemu_pcnet.patch b/system/qemu/patches/qemu_pcnet.patch new file mode 100644 index 0000000000..25c89cd90b --- /dev/null +++ b/system/qemu/patches/qemu_pcnet.patch @@ -0,0 +1,18 @@ +index bdfd38f..68b9981 100644 (file) +--- a/hw/net/pcnet.c ++++ b/hw/net/pcnet.c +@@ -1241,6 +1241,14 @@ static void pcnet_transmit(PCNetState *s) + } + + bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT); ++ ++ /* if multi-tmd packet outsizes s->buffer then skip it silently. ++ Note: this is not what real hw does */ ++ if (s->xmit_pos + bcnt > sizeof(s->buffer)) { ++ s->xmit_pos = -1; ++ goto txdone; ++ } ++ + s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr), + s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s)); + s->xmit_pos += bcnt; |