qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] macio ide question/bug report
Date: Thu, 15 May 2014 22:28:35 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LMD.2.02.1405152227040.991@jedlik.phy.bme.hu> (raw)
In-Reply-To: <alpine.LMD.2.02.1405152223390.991@jedlik.phy.bme.hu>

On Thu, 15 May 2014, BALATON Zoltan wrote:
> 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:

I should've also included these lines too to make it more clear what did I 
change:

114	    if (s->packet_transfer_size && s->lba == -1) {
115	        MACIO_DPRINTF("non-IO ATAPI DMA transfer size: %d\n", io->len);
non-IO ATAPI DMA transfer size: 804
117	        cpu_physical_memory_write(io->addr, s->io_buffer, s->io_buffer_size);
118	        s->packet_transfer_size -= s->io_buffer_size;
119	        MACIO_DPRINTF("end of non-IO ATAPI DMA transfer\n");

> 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
>

  reply	other threads:[~2014-05-15 20:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LMD.2.02.1405040120250.2612@jedlik.phy.bme.hu>
     [not found] ` <5366CA94.3030803@ilande.co.uk>
     [not found]   ` <alpine.LMD.2.02.1405071132470.25770@jedlik.phy.bme.hu>
     [not found]     ` <536A328F.6070100@ilande.co.uk>
     [not found]       ` <alpine.LMD.2.02.1405071854390.26524@jedlik.phy.bme.hu>
     [not found]         ` <536A6F3C.1030708@ilande.co.uk>
2014-05-10 12:30           ` [Qemu-devel] [Qemu-ppc] macio ide question/bug report BALATON Zoltan
2014-05-12 16:26             ` Mark Cave-Ayland
2014-05-12 19:32               ` BALATON Zoltan
2014-05-12 20:34                 ` Mark Cave-Ayland
2014-05-13 23:02                   ` BALATON Zoltan
2014-05-14  4:55                     ` Mark Cave-Ayland
2014-05-14 11:10                       ` BALATON Zoltan
2014-05-14 20:09                         ` Mark Cave-Ayland
2014-05-14 23:21                           ` BALATON Zoltan
2014-05-15  9:30                             ` Mark Cave-Ayland
2014-05-15 17:28                               ` BALATON Zoltan
2014-05-15 19:22                                 ` Mark Cave-Ayland
2014-05-15 20:14                                   ` BALATON Zoltan
2014-05-15 20:26                                     ` BALATON Zoltan
2014-05-15 20:28                                       ` BALATON Zoltan [this message]
2014-05-16 11:22                                         ` Mark Cave-Ayland
2014-05-16 20:31                                           ` BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LMD.2.02.1405152227040.991@jedlik.phy.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=agraf@suse.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).