From patchwork Tue Apr 16 00:26:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 236791 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DE1FE2C00C4 for ; Tue, 16 Apr 2013 10:32:24 +1000 (EST) Received: from localhost ([::1]:44127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URtot-00064r-3l for incoming@patchwork.ozlabs.org; Mon, 15 Apr 2013 20:32:23 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URtlW-00017d-70 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:28:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URtlV-0000XL-B7 for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:28:54 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:55444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URtlV-0000XH-4y for qemu-devel@nongnu.org; Mon, 15 Apr 2013 20:28:53 -0400 Received: by mail-pa0-f42.google.com with SMTP id kq13so15919pab.29 for ; Mon, 15 Apr 2013 17:28:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=IvSJ8Aph1rvvhnpn8pYCgOpaJEBdvNQcW2MVLSaLeu0=; b=YdJt/kwjdG7RbOlJia3fbJ1+5GjXeowPAiL0PKSe1S9o1Pne6NRZXynLJAEagzBPA9 bmmZN1e3Cp3eXuyelzCGuq87KQO55o+QGHB01T7ZJsYcspEOYfYeZwSTRoC5zDV06m4c CNWUl4P+csIJ0Mt+/47b0ziOE7yFuYGk1MfL1UxPpE184/4q/vnchPly1EpsEX+jpeVV YCNxv8q/Zl18Sp0yCwaY+BfEUTOyB75vClsvClS6Ec+ZP3mUBOWUtoBR/wGOQ4eSse4D mx7T+LnqSmO6zxrLeQsu2hqliVycynkPE1eRJwfu4wKR38R4zTJNzs6n7dqvgZIYzfLk 6wOQ== X-Received: by 10.66.144.136 with SMTP id sm8mr580909pab.115.1366072132361; Mon, 15 Apr 2013 17:28:52 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPS id qh4sm114527pac.8.2013.04.15.17.28.50 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 15 Apr 2013 17:28:51 -0700 (PDT) From: peter.crosthwaite@xilinx.com To: qemu-devel@nongnu.org Date: Tue, 16 Apr 2013 10:26:37 +1000 Message-Id: <851df01ecf04866ac7f2e8c4639d8fb993b0a2f8.1366069170.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: X-Gm-Message-State: ALoCoQmXWSFlHQXqiXap0y2gu/PXueZj59i4vDQbldTmko9JN2eeOnqRlXikC9GcYQe4/o+pDVIi X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.42 Cc: edgar.iglesias@gmail.com Subject: [Qemu-devel] [PATCH v6 13/16] xilinx_axidma: Fix rx/tx halted bit. 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 From: Peter Crosthwaite If there is no DMA buffer descriptor, the DMA halts, not idles. Signed-off-by: Peter Crosthwaite Acked-by: Edgar E. Iglesias --- changed from v3: Fixed for TX path as well as RX hw/dma/xilinx_axidma.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index 02700ea..2bbfea1 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -276,7 +276,7 @@ static void stream_process_mem2s(struct Stream *s, stream_desc_load(s, s->regs[R_CURDESC]); if (s->desc.status & SDESC_STATUS_COMPLETE) { - s->regs[R_DMASR] |= DMASR_IDLE; + s->regs[R_DMASR] |= DMASR_HALTED; break; } @@ -331,7 +331,7 @@ static void stream_process_s2mem(struct Stream *s, stream_desc_load(s, s->regs[R_CURDESC]); if (s->desc.status & SDESC_STATUS_COMPLETE) { - s->regs[R_DMASR] |= DMASR_IDLE; + s->regs[R_DMASR] |= DMASR_HALTED; break; }