From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tuomas Vainikka Subject: Re: [PATCH 0/2] Experimental Amiga Zorro ESP driver Date: Mon, 19 Aug 2013 23:46:02 +0300 Message-ID: <5212840A.4080300@aalto.fi> References: <1370552199-15048-1-git-send-email-schmitz@debian.org> <520D4AE3.6040801@aalto.fi> <520E76FC.9040803@aalto.fi> <11425cb5ec432e2fbb7b675052e8b33d@gmail.com> <520F5F81.7090409@aalto.fi> <52102BEC.7000006@gmail.com> <52108CAF.1010700@gmail.com> <5211DBD8.5090801@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050901000200000009060608" Return-path: Received: from mx06.aalto.fi ([130.233.222.105]:38736 "EHLO mx06.aalto.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121Ab3HSUqF (ORCPT ); Mon, 19 Aug 2013 16:46:05 -0400 In-Reply-To: <5211DBD8.5090801@gmail.com> Sender: linux-m68k-owner@vger.kernel.org List-Id: linux-m68k@vger.kernel.org To: Michael Schmitz Cc: Geert Uytterhoeven , Linux/m68k --------------050901000200000009060608 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit On 08/19/2013 11:48 AM, Michael Schmitz wrote: > Geert, >> On Sun, Aug 18, 2013 at 10:58 AM, Michael Schmitz >> wrote: >>> I'll also need to check the command_block and command_block_dma >>> addresses - >>> does the DMA require virtual or physical addresses? >> >> Physical, of course. > > :-) VDMA was invented a bit later ... > > > I'll go check the usage of the DMA API calls again, but as the driver > seems to do DMA fine until the short transfer, that seems the most > likely cause. PIO for dma_count < 7 might be an option. > > I see transfers with esp_count=1 and dma_count=7 in the log - wonder > why that works but the short 2/2 byte case does not. > > Cheers, > > Michael > I guess those two bytes have something to do with target (re)selection... There are two different ways of attempting to read these bytes in the code, one is reading them from the FIFO byte by byte, and the other way is to setup a DMA read (write from device). The two different schemes are used in two different functions, and I do not understand why one method would be preferred over the other when comparing these functions. I think I managed to find these two bytes; They are not ready for DMA, but are sitting in the FIFO waiting to be read. So the loop before the "IRQ2 timeout" is waiting for an interrupt that would tell that the DMA transfer has finished. ... [13433.390000] ESP: Disconnecting tgt[1] tag[20:0] [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x97, 2 bytes in FIFO. [13433.400000] ESP: intr sreg[97] seqreg[04] sreg2[00] ireg[0c] [13433.400000] ESP: reconnect tag, zorro_esp_irq_pending(): ESP_STATUS = 0x97, 0 bytes in FIFO. [13433.400000] IRQ(0:10:97), zorro_esp: esp_count = 2, dma_count = 2, addr = 0x7fa59000. Writing. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. [13433.400000] zorro_esp_irq_pending(): ESP_STATUS = 0x17, 2 bytes in FIFO. ... Remember that write is read :) Now, I guess, I have to check whether those two bytes contain the right information... -Tuomas --------------050901000200000009060608 Content-Type: application/x-gzip; name="zesp014.cap.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="zesp014.cap.gz" H4sICD1/ElIAA3plc3AwMTQuY2FwAO2dbW/byBHH3wb5FAv0jQPYKh9kiRQQoEpiX402udzJ aV8IhkFLlCrUknwijd7lRT97l5JF8UEz2llvD2jxFxxDsTg/zQ53/7skh8O3m/U6/1OyXMyT wb//oK6/ffzLG/3aLJfrqUqzp4tski3evLy+rzeb9YX+6/4Pb5pb7F7a9mmzfkgVbVCw76fp w/P8vffrTL+Gv/9XPmba6g3d3N3rsFX5HSTxbT2apw3+W/F+O/bDbhB1wsjTr7vdB/f6g4H6 8Lj4/j3ZTJUfhJ6arZ9XU5XkKplON2mWKe/XNClsOiUibiEW62Jr9X67cfEN52q6TA5/e6gB uv4OsDXVv/TWm3SejSNvZzzQbx52myw2v4yDu9IwbBiqRaYSdT0cBWHvXHU99fnP39XZZDJ7 7707V6OPoxt180n1S/vLhuf3mn//lK6mi9X87N1AXY2+3o9uh7ffRlu/tWOeevgtTzO1WKnr m+sfD23ouUP13aGae9cWFXe2oXaE8t2gQq8TOIpVgXIUq9Dv+KE7VNcZat/bC3noqe2AKT96 CaOGDVQ+z8f6/ePzavyy9f1kOVVjrQfK815+gm7x+64JqGhA4etEi0eu/eqfq0IAyv/7enSW atCfJZeFhHTUz2lSNKv0uC/sKBHT+j1r28TFKt+oTIuM1hjdxPSX4u02NvpNMN4pjf5T4JUt 7AfOdkTfXffodxs7zhfuuH6zf7nZcUI1jH2mib2jOy72uR3nR3dH7bM82eRqmuTJthnj/iyO vOlD0d3T1Tjs3al/bRZ5eua/I5tSD1Axz9QiFNYjtMN31N81thYhoXD5XISEyhWHp1nNaIeH aHfb0a4Mk6r9Ns7T9SpVs0c9n2/32Covwmztuu6QgdD1Pue6F9n7wo1LwheP8yUgwvhxvVwm ehG2jaTuwflzVgzwpV6NJfN0XLFqrsROdSq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