Re: m68k v3.16 status update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Finn,

On Wed, Dec 20, 2017 at 12:01 PM, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
On Tue, 19 Dec 2017, Michael Schmitz wrote:


esp->command_block_dma is mapped at driver init time so we don't get to
chose at command submission time.

When the command is submitted, ops->send_dma_cmd() can do something like
this,

static void zorro_esp_send_dma_cmd(struct esp *esp, u32 dma_addr, u32 esp_count,
                                   u32 dma_count, int write, u8 cmd);
{
        if ((dma_addr_t)dma_addr == esp->command_block_dma && esp_count < 4) {
                zorro_esp_send_pio_cmd(esp, (u32)esp->command_block, esp_count,
                                       dma_count, write, cmd);
                return;
        }

        /* do the usual DMA... */
}

This logic completely ignores data transfers (including sense transfers)
but it is simple and self-contained and should get the job done.

That's one way to do this, yes.

From what you said, I think you already arrived at this code (or something
equivalent). Is there a problem? Do we have to do PIO data transfers too?

I test for phase == ESP_MIP and direct to the PIO routine, and use the
following code to fix up the transfer address there:

+       /* extended message in transfer? need to fixup addr */
+       if (cmd == ESP_CMD_TI && addr == esp->command_block_dma)
+               addr = (u32) esp->command_block;
+

Note that addr = phys_to_virt((u32) esp->command_block_dma) works just
the same (even though phys_to_virt((u32) esp->command_block_dma) !=
esp->command_block).

We don't have to do PIO data transfers - would have been useful to
debug DMA issues on 'new' boards but not essential.

Your solution is simpler and more generic so I'll try that one and
will probably use it.

Cheers,

  Michael



--
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux