Commit 3dc1cb3428f8661f99e03cfac6f5aedf3d614927

Authored by pbrook
1 parent 35f1df84

ESP DMA fix.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2110 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 2 deletions
hw/esp.c
@@ -206,7 +206,6 @@ static void esp_do_dma(ESPState *s) @@ -206,7 +206,6 @@ static void esp_do_dma(ESPState *s)
206 { 206 {
207 uint32_t dmaptr, minlen, len, from, to; 207 uint32_t dmaptr, minlen, len, from, to;
208 int to_device; 208 int to_device;
209 - dmaptr = iommu_translate(s->espdmaregs[1]);  
210 to_device = (s->espdmaregs[0] & DMA_WRITE_MEM) == 0; 209 to_device = (s->espdmaregs[0] & DMA_WRITE_MEM) == 0;
211 from = s->espdmaregs[1]; 210 from = s->espdmaregs[1];
212 minlen = s->dma_left; 211 minlen = s->dma_left;
@@ -218,8 +217,8 @@ static void esp_do_dma(ESPState *s) @@ -218,8 +217,8 @@ static void esp_do_dma(ESPState *s)
218 len = to - from; 217 len = to - from;
219 } 218 }
220 DPRINTF("DMA address p %08x v %08x len %08x, from %08x, to %08x\n", dmaptr, s->espdmaregs[1], len, from, to); 219 DPRINTF("DMA address p %08x v %08x len %08x, from %08x, to %08x\n", dmaptr, s->espdmaregs[1], len, from, to);
221 - s->espdmaregs[1] += len;  
222 if (s->do_cmd) { 220 if (s->do_cmd) {
  221 + s->espdmaregs[1] += len;
223 s->ti_size -= len; 222 s->ti_size -= len;
224 DPRINTF("command len %d + %d\n", s->cmdlen, len); 223 DPRINTF("command len %d + %d\n", s->cmdlen, len);
225 cpu_physical_memory_read(dmaptr, &s->cmdbuf[s->cmdlen], len); 224 cpu_physical_memory_read(dmaptr, &s->cmdbuf[s->cmdlen], len);