From patchwork Sun Nov 6 21:48:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 123971 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8C75FB6F69 for ; Mon, 7 Nov 2011 08:49:30 +1100 (EST) Received: from localhost ([::1]:37801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNAab-0003Pp-HY for incoming@patchwork.ozlabs.org; Sun, 06 Nov 2011 16:49:17 -0500 Received: from eggs.gnu.org ([140.186.70.92]:57822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNAaR-0003Pb-L7 for qemu-devel@nongnu.org; Sun, 06 Nov 2011 16:49:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNAaQ-0005CQ-IJ for qemu-devel@nongnu.org; Sun, 06 Nov 2011 16:49:07 -0500 Received: from smtp23.services.sfr.fr ([93.17.128.19]:37173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNAaQ-0005Bn-BH for qemu-devel@nongnu.org; Sun, 06 Nov 2011 16:49:06 -0500 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2302.sfr.fr (SMTP Server) with ESMTP id 1C4567000154; Sun, 6 Nov 2011 22:48:58 +0100 (CET) Received: from localhost.localdomain (unknown [92.90.16.152]) by msfrf2302.sfr.fr (SMTP Server) with ESMTP id 5F5007000068; Sun, 6 Nov 2011 22:48:57 +0100 (CET) X-SFR-UUID: 20111106214857390.5F5007000068@msfrf2302.sfr.fr From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: qemu-devel@nongnu.org Date: Sun, 6 Nov 2011 22:48:52 +0100 Message-Id: <1320616132-21864-3-git-send-email-hpoussin@reactos.org> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: <1320616132-21864-1-git-send-email-hpoussin@reactos.org> References: <1320616132-21864-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 93.17.128.19 Cc: Anthony Liguori , =?UTF-8?q?Herv=C3=A9=20Poussineau?= Subject: [Qemu-devel] [PATCH 3/3] sonic: reset all bits of in_use field when required X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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);