[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] sonic: reset all bits of in_use field when requ
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [PATCH 3/3] sonic: reset all bits of in_use field when required |
Date: |
Sun, 6 Nov 2011 22:48:52 +0100 |
This field is 16 or 32 bit wide depending of SONIC_DCR_DW bit.
Fixes network in NetBSD 5.1/arc
Signed-off-by: Hervé Poussineau <address@hidden>
---
hw/dp8393x.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/dp8393x.c b/hw/dp8393x.c
index acb1604..c3e86ce 100644
--- a/hw/dp8393x.c
+++ b/hw/dp8393x.c
@@ -817,7 +817,7 @@ static ssize_t nic_receive(VLANClientState *nc, const
uint8_t * buf, size_t size
/* EOL detected */
s->regs[SONIC_ISR] |= SONIC_ISR_RDE;
} else {
- data[0 * width] = 0; /* in_use */
+ memset(&data[0 * width], 0, width * sizeof(uint16_t)); /* in_use */
s->memory_rw(s->mem_opaque,
((s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA]) +
sizeof(uint16_t) * 6 * width,
(uint8_t *)data, size, 1);
--
1.7.6.3