On Wed, 20 Dec 2017, Michael Schmitz wrote:

> 
> I test for phase == ESP_MIP and direct to the PIO routine,

I'm more pessimistic and expect short DMA transfers to fail in any phase 
(though in practice that may never happen).

> 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.
> 

Yes. I think it would be good to add a comment to say that the problem was 
only observed for 2-byte MESSAGE IN transfers (so far), and also that in 
general short transfers will not be caught this way because they may 
involve cmd->sense_buffer or scsi_sglist(cmd) and not esp->command_block.

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

Like you, I'd also prefer a complete solution but it can wait until the 
need arises.

-- 

> 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

Reply via email to