Received: from eggs.gnu.org ([2001:4830:134:3::10]:47452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2Ee-0007a8-W1 for qemu-devel@nongnu.org; Thu, 15 May 2014 16:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wl2EY-0002kc-77 for qemu-devel@nongnu.org; Thu, 15 May 2014 16:26:36 -0400 Date: Thu, 15 May 2014 22:26:27 +0200 (CEST) From: BALATON Zoltan In-Reply-To: Message-ID: References: <5366CA94.3030803@ilande.co.uk> <536A328F.6070100@ilande.co.uk> <536A6F3C.1030708@ilande.co.uk> <5370F620.7050206@ilande.co.uk> <5371303F.1060903@ilande.co.uk> <5372F741.9080108@ilande.co.uk> <5373CD82.6000407@ilande.co.uk> <53748952.9080909@ilande.co.uk> <537513FA.6060705@ilande.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [Qemu-devel] [Qemu-ppc] macio ide question/bug report List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland Cc: qemu-ppc@nongnu.org, Alexander Graf , qemu-devel@nongnu.org On Thu, 15 May 2014, BALATON Zoltan wrote: > confusing.) Do you think that replacing io->len in your patch with > s->io_buffer_size would be the correct thing to do? Probably that's not enough. I've tried it and then it gets to here: end of non-IO ATAPI DMA transfer 122 if (!s->packet_transfer_size) { (gdb) p s->packet_transfer_size $1 = 0 (gdb) n 123 MACIO_DPRINTF("end of transfer\n"); end of transfer 124 ide_atapi_cmd_ok(s); 125 m->dma_active = false; 128 if (io->len == 0) { (gdb) p io->len $2 = 804 (gdb) l 123 MACIO_DPRINTF("end of transfer\n"); 124 ide_atapi_cmd_ok(s); 125 m->dma_active = false; 126 } 127 128 if (io->len == 0) { 129 MACIO_DPRINTF("end of DMA\n"); 130 goto done; 131 } 132 133 /* launch next transfer */ 134 135 /* handle unaligned accesses first, get them over with and only do the 136 remaining bulk transfer using our async DMA helpers */ 137 unaligned = io->len & 0x1ff; 138 if (unaligned) { 139 int sector_num = (s->lba << 2) + (s->io_buffer_index >> 9); 140 int nsector = io->len >> 9; 141 142 MACIO_DPRINTF("precopying unaligned %d bytes to %#" HWADDR_PRIx "\n", (gdb) c Continuing. precopying unaligned 292 bytes to 0xe4f50c io->len = 0x200 set remainder to: -20 sector_num=-4 size=0, cmd_cmd=0 atapi_cmd_error: sense=0x5 asc=0x21 done DMA DBDMA: dbdma_end Regards, BALATON Zoltan