From patchwork Sun May 31 20:05:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 478730 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 93C03140E5E for ; Mon, 1 Jun 2015 06:08:53 +1000 (AEST) Received: from localhost ([::1]:43334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz9XP-00019y-NY for incoming@patchwork.ozlabs.org; Sun, 31 May 2015 16:08:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz9Um-000542-At for qemu-devel@nongnu.org; Sun, 31 May 2015 16:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yz9Ul-0002gA-An for qemu-devel@nongnu.org; Sun, 31 May 2015 16:06:08 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:58368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yz9Ul-0002fz-4n; Sun, 31 May 2015 16:06:07 -0400 Received: from 4e56a460.skybroadband.com ([78.86.164.96] helo=kentang.lan) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1Yz9Ui-00085Q-SB; Sun, 31 May 2015 21:06:06 +0100 From: Mark Cave-Ayland To: jsnow@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Sun, 31 May 2015 21:05:32 +0100 Message-Id: <1433102732-24034-5-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1433102732-24034-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1433102732-24034-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 78.86.164.96 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 4/4] macio: remove remainder_len DBDMA_io property 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 Since the block alignment code is now effectively independent of the DMA implementation, this variable is no longer required and can be removed. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c | 13 ------------- include/hw/ppc/mac_dbdma.h | 1 - 2 files changed, 14 deletions(-) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index f722bbc..a3461a2 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -278,7 +278,6 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) MACIO_DPRINTF("DMA error: %d\n", ret); m->aiocb = NULL; ide_dma_error(s); - io->remainder_len = 0; goto done; } @@ -509,9 +508,6 @@ static void ide_dbdma_start(IDEDMA *dma, IDEState *s, BlockCompletionFunc *cb) { MACIOIDEState *m = container_of(dma, MACIOIDEState, dma); - DBDMAState *dbdma = m->dbdma; - DBDMA_io *io; - int i; s->io_buffer_index = 0; if (s->drive_kind == IDE_CD) { @@ -526,15 +522,6 @@ static void ide_dbdma_start(IDEDMA *dma, IDEState *s, MACIO_DPRINTF("lba: %x size: %x\n", s->lba, s->io_buffer_size); MACIO_DPRINTF("-------------------------\n"); - for (i = 0; i < DBDMA_CHANNELS; i++) { - io = &dbdma->channels[i].io; - - if (io->opaque == m) { - io->remainder_len = 0; - } - } - - MACIO_DPRINTF("\n"); m->dma_active = true; DBDMA_kick(m->dbdma); } diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h index 7f247fa..c687021 100644 --- a/include/hw/ppc/mac_dbdma.h +++ b/include/hw/ppc/mac_dbdma.h @@ -42,7 +42,6 @@ struct DBDMA_io { /* unaligned last sector of a request */ uint8_t head_remainder[0x200]; uint8_t tail_remainder[0x200]; - int remainder_len; QEMUIOVector iov; };