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 <hpous...@reactos.org>
---
 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

Reply via email to