aboutsummaryrefslogtreecommitdiff
path: root/hw/pcnet.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-20 10:59:29 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-20 10:59:29 +0000
commit9bd0d294015e101b845b8af4c274bfe051996ef5 (patch)
tree7408d28b14ab2328e4ad3b5544d45058b15d19b7 /hw/pcnet.c
parentb305b5ba18d459eaa0ddf782921ff64f82ff4a2c (diff)
PCnet: Allow more then two TMDs (Jan Kiszka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4225 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pcnet.c')
-rw-r--r--hw/pcnet.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/hw/pcnet.c b/hw/pcnet.c
index a886d87e8b..0d0bb872c7 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1249,15 +1249,14 @@ static void pcnet_transmit(PCNetState *s)
#endif
if (GET_FIELD(tmd.status, TMDS, STP)) {
s->xmit_pos = 0;
- if (!GET_FIELD(tmd.status, TMDS, ENP)) {
- int bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT);
- s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr),
- s->buffer, bcnt, CSR_BSWP(s));
- s->xmit_pos += bcnt;
- }
xmit_cxda = PHYSADDR(s,CSR_CXDA(s));
}
- if (GET_FIELD(tmd.status, TMDS, ENP) && (s->xmit_pos >= 0)) {
+ if (!GET_FIELD(tmd.status, TMDS, ENP)) {
+ int bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT);
+ s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr),
+ s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s));
+ s->xmit_pos += bcnt;
+ } else if (s->xmit_pos >= 0) {
int bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT);
s->phys_mem_read(s->dma_opaque, PHYSADDR(s, tmd.tbadr),
s->buffer + s->xmit_pos, bcnt, CSR_BSWP(s));