From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ItPZM-0001tl-4q for qemu-devel@nongnu.org; Sat, 17 Nov 2007 10:26:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ItPZL-0001t0-JS for qemu-devel@nongnu.org; Sat, 17 Nov 2007 10:26:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ItPZL-0001sp-Bo for qemu-devel@nongnu.org; Sat, 17 Nov 2007 10:26:51 -0500 Received: from ug-out-1314.google.com ([66.249.92.174]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ItPZK-0002Cm-Uk for qemu-devel@nongnu.org; Sat, 17 Nov 2007 10:26:51 -0500 Received: by ug-out-1314.google.com with SMTP id m2so722824uge for ; Sat, 17 Nov 2007 07:26:49 -0800 (PST) Message-ID: Date: Sat, 17 Nov 2007 16:26:49 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH] hw/pxa2xx_dma.c In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_10373_16097531.1195313209723" References: <473C1717.4040206@gmx.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_10373_16097531.1195313209723 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 17/11/2007, andrzej zaborowski wrote: > Hi, > > On 15/11/2007, Thorsten Zitterell wrote: > > The following patch fixes the problem that DMA transfers are not performed when > > the DCSR_STOPINTR bit is set. > > -- > > Thorsten > > > > Index: hw/pxa2xx_dma.c > > =================================================================== > > RCS file: /sources/qemu/qemu/hw/pxa2xx_dma.c,v > > retrieving revision 1.5 > > diff -u -r1.5 pxa2xx_dma.c > > --- hw/pxa2xx_dma.c 11 Nov 2007 19:47:58 -0000 1.5 > > +++ hw/pxa2xx_dma.c 15 Nov 2007 09:28:22 -0000 > > @@ -186,7 +186,8 @@ > > s->running = 1; > > for (c = 0; c < s->channels; c ++) { > > ch = &s->chan[c]; > > - > > + > > + ch->state &= ~DCSR_STOPINTR; > > while ((ch->state & DCSR_RUN) && !(ch->state & DCSR_STOPINTR)) { > > /* Test for pending requests */ > > if ((ch->cmd & (DCMD_FLOWSRC | DCMD_FLOWTRG)) && !ch->request) > > > > > > Can you check if the following change would make the gumstix NIC work > too? In my understanding of the specs it's more correct, but I'm not > sure. Sorry, rather this is what I meant: --- a/hw/pxa2xx_dma.c +++ b/hw/pxa2xx_dma.c @@ -347,8 +348,10 @@ static void pxa2xx_dma_write(void *opaque, if (value & DCSR_NODESCFETCH) { /* No-descriptor-fetch mode */ - if (value & DCSR_RUN) + if (value & DCSR_RUN) { + s->chan[channel].state &= ~DCSR_STOPINTR; pxa2xx_dma_run(s); + } } else { /* Descriptor-fetch mode */ if (value & DCSR_RUN) { ------=_Part_10373_16097531.1195313209723 Content-Type: text/x-patch; name=pxa-dma-stopintr-clear.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_f94crsw6 Content-Disposition: attachment; filename=pxa-dma-stopintr-clear.patch ZGlmZiAtLWdpdCBhL2h3L3B4YTJ4eF9kbWEuYyBiL2h3L3B4YTJ4eF9kbWEuYwppbmRleCA0YzYw ZmZkLi4wNDhjYjkzIDEwMDY0NAotLS0gYS9ody9weGEyeHhfZG1hLmMKKysrIGIvaHcvcHhhMnh4 X2RtYS5jCkBAIC0zNDcsOCArMzQ4LDEwIEBAIHN0YXRpYyB2b2lkIHB4YTJ4eF9kbWFfd3JpdGUo dm9pZCAqb3BhcXVlLAogCiAgICAgICAgIGlmICh2YWx1ZSAmIERDU1JfTk9ERVNDRkVUQ0gpIHsK ICAgICAgICAgICAgIC8qIE5vLWRlc2NyaXB0b3ItZmV0Y2ggbW9kZSAqLwotICAgICAgICAgICAg aWYgKHZhbHVlICYgRENTUl9SVU4pCisgICAgICAgICAgICBpZiAodmFsdWUgJiBEQ1NSX1JVTikg eworICAgICAgICAgICAgICAgIHMtPmNoYW5bY2hhbm5lbF0uc3RhdGUgJj0gfkRDU1JfU1RPUElO VFI7CiAgICAgICAgICAgICAgICAgcHhhMnh4X2RtYV9ydW4ocyk7CisgICAgICAgICAgICB9CiAg ICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAvKiBEZXNjcmlwdG9yLWZldGNoIG1vZGUgKi8K ICAgICAgICAgICAgIGlmICh2YWx1ZSAmIERDU1JfUlVOKSB7Cg== ------=_Part_10373_16097531.1195313209723--