On Tue, 19 Dec 2017, Michael Schmitz wrote:
> Contrary to the Mac driver, esp->command_block and
> esp->command_block_dma are not identical addresses on Amiga.
Why not make them identical, depending on the length of the tranfer? (Then
choose PIO or DMA by testing for the same threshold.)
> Is there a generic way to map a DMA address (i.e., physical address
> AFAIK) to a kernel virtual one?
>
I don't know of a good way to do that.
> (I can use esp->command_block in the reconnect message special case but
> not otherwise ...)
Maybe something like this...
struct esp_cmd_entry *ent = esp->active_cmd;
struct esp_cmd_priv *spriv = ESP_CMD_PRIV(ent->cmd);
struct scatterlist *sg = spriv->cur_sg;
unsigned long addr = sg_page(sg) + sg->offset;
but that doesn't work for the esp_autosense() case, which doesn't involve
esp->ops->map_sg...
HTH
--
> Cheers,
>
> Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html