On 08/18/2013 11:58 AM, Michael Schmitz wrote:
The original blz1230 / blz2060 drivers did PIO commands. I attached a log of modprobing first without interrupt messages and then with the interrupt messages, because, indeed, the zorro_esp_irq_pending function gets called a lot, and it takes forever to printk those messages. I have no idea about the correct iomappings for the registers, nor do I know about the correct sizes for them. I have no idea where to use physical addresses and where to use virtual addresses...Geert,On Sun, Aug 18, 2013 at 4:05 AM, Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:[ 301.880000] esp: esp0: Reconnect IRQ2 timeoutBeware that this message (incl. the number) is hardcoded in drivers/scsi/esp_scsi.c: if (i == ESP_RESELECT_TAG_LIMIT) { printk(KERN_ERR PFX "esp%d: Reconnect IRQ2 timeout\n", esp->host->unique_id); return NULL; } The driver prints "IRQ1" or "IRQ2". Fortunately, IRQ_AMIGA_PORTS is 2, but this is purely coincidentally...The driver attempts to DMA two bytes - can the DMA on the Zorro ESP cards handle such short transfers?I'll also need to check the command_block and command_block_dma addresses - does the DMA require virtual or physical addresses?Yep - you'll be guaranteed to get a few IDE interrupts just by calling up cat - might be possible to get away without too much interrupts generated if it's all in the buffer cache - try whether the interrupt count changes afterAre there interrupts logged for IRQ2 at all (cat /proc/interrupts)? It looks to me as though all DMA transfers fail (the first command to fail is READ_CAPACITY which would usually be issued right after IDENTIFY IIRC).root@amiga:/# cat /proc/interrupts CPU0 2: 1066320 auto CIAA, zorro8390, ide0, Amiga Zorro ESP 6: 456970 auto CIAB 8: 38239 amiga serial TX 9: 0 amiga floppy_dma 12: 315934 amiga fb vertb handler 13: 315741 amiga serial status 15: 0 amiga DMA sound 19: 401 amiga serial RX 23: 1 cia floppy_timer 25: 0 cia amikbd 27: 456971 cia timer ERR: 0 Seems like IRQ2 is very popular, so it's hard to say which device has generated the interrupts...a few repetitions of that command. Might require more elaborate IRQ bookkeeping though.I guess scsi_esp_intr() is called a lot, as it's a shared interrupt?That's right - it will indeed be called a lot.The code in question polls for completion in the ESP chip interrupt register, so checking in scsi_esp_intr won't help there. I suspect the ESP gets stuck because the DMA operation never completes. Wonder whether we can just do PIO in send_dma_cmd() in these cases ...Can you add some debug prints there, to see if any of the conditions the esp core checks are met?
What is the difference between ioremap() and ZTWO_VADDR() and which one should be used where?
-Tuomas
Attachment:
zorro_esp.c.gz
Description: GNU Zip compressed data
Attachment:
zesp001.cap.gz
Description: GNU Zip compressed data