Commit 9bd0d294015e101b845b8af4c274bfe051996ef5
1 parent
b305b5ba
PCnet: Allow more then two TMDs (Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4225 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
7 deletions
hw/pcnet.c
... | ... | @@ -1249,15 +1249,14 @@ static void pcnet_transmit(PCNetState *s) |
1249 | 1249 | #endif |
1250 | 1250 | if (GET_FIELD(tmd.status, TMDS, STP)) { |
1251 | 1251 | s->xmit_pos = 0; |
1252 | - if (!GET_FIELD(tmd.status, TMDS, ENP)) { | |
1253 | - int bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT); | |
1254 | - s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr), | |
1255 | - s->buffer, bcnt, CSR_BSWP(s)); | |
1256 | - s->xmit_pos += bcnt; | |
1257 | - } | |
1258 | 1252 | xmit_cxda = PHYSADDR(s,CSR_CXDA(s)); |
1259 | 1253 | } |
1260 | - if (GET_FIELD(tmd.status, TMDS, ENP) && (s->xmit_pos >= 0)) { | |
1254 | + if (!GET_FIELD(tmd.status, TMDS, ENP)) { | |
1255 | + int bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT); | |
1256 | + s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr), | |
1257 | + s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s)); | |
1258 | + s->xmit_pos += bcnt; | |
1259 | + } else if (s->xmit_pos >= 0) { | |
1261 | 1260 | int bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT); |
1262 | 1261 | s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr), |
1263 | 1262 | s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s)); | ... | ... |