From patchwork Thu Jun 4 21:59:37 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: 480909 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 23256140081 for ; Fri, 5 Jun 2015 08:00:36 +1000 (AEST) Received: from localhost ([::1]:44262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0dBh-0003wm-Su for incoming@patchwork.ozlabs.org; Thu, 04 Jun 2015 18:00:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0dBD-0002vc-Hb for qemu-devel@nongnu.org; Thu, 04 Jun 2015 18:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0dBA-00007I-JC for qemu-devel@nongnu.org; Thu, 04 Jun 2015 18:00:03 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:37286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0dBA-00006d-DU; Thu, 04 Jun 2015 18:00:00 -0400 Received: from 5ec27711.skybroadband.com ([94.194.119.17] 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 1Z0dB3-0002zK-01; Thu, 04 Jun 2015 22:59:54 +0100 From: Mark Cave-Ayland To: jsnow@redhat.com, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org Date: Thu, 4 Jun 2015 22:59:37 +0100 Message-Id: <1433455177-21243-5-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1433455177-21243-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1433455177-21243-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 94.194.119.17 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 v2 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 Reviewed-by: John Snow --- 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 d353bd2..dd52d50 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; };