lkml.org 
[lkml]   [2019]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] esp_scsi: Clear Transfer Count registers before PIO transfers
Hi Finn,

Op za 16 nov. 2019 om 04:36 schreef Finn Thain <fthain@telegraphics.com.au>:
>
> The zorro_esp driver uses both PIO and DMA transfers. If a failed DMA
> transfer happened to be followed by a PIO transfer, the TCLOW and TCMED
> registers would not get cleared. It is theoretically possible that the
> stale value from the transfer counter or the TCLOW/TCMED registers
> could then be used by the controller and the driver. Avoid that by
> clearing these registers before each PIO transfer.

Are you sure this is really needed?

The only place where the driver reads these registers is after a data
transfer. These are done using DMA on all Zorro boards, so I don’t
think there’s a risk of stale values from a PIO transfer there.

The only place the controller reads these registers is when a DMA
command is issued. The only place where that is done is in the
zorro_esp send_dma_command() functions. These all set both registers
explicitly before issuing the DMA command to the controller, so I
don’t think there’s a risk there either.

Kind regards,

Kars.

\
 
 \ /
  Last update: 2019-11-17 07:27    [W:0.143 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site