[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 13/42] esp: remove dma_left from ESPState
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 13/42] esp: remove dma_left from ESPState |
Date: |
Tue, 23 Feb 2021 22:22:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2/9/21 8:29 PM, Mark Cave-Ayland wrote:
> The ESP device already keeps track of the remaining bytes left to transfer via
> its TC (transfer counter) register which is decremented for each byte that
> is transferred across the SCSI bus.
>
> Switch the transfer logic to use the value of TC instead of dma_left and then
> remove dma_left completely, adding logic to the vmstate_esp post_load()
> function
> to transfer the old dma_left value to the TC register during migration from
> older versions.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/scsi/esp.c | 47 ++++++++++++++++++++++++++++---------------
> include/hw/scsi/esp.h | 5 +++--
> 2 files changed, 34 insertions(+), 18 deletions(-)
I dare to add:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
- Re: [PATCH v2 10/42] esp: introduce esp_get_stc(), (continued)
[PATCH v2 11/42] esp: apply transfer length adjustment when STC is zero at TC load time, Mark Cave-Ayland, 2021/02/09
[PATCH v2 12/42] esp: remove dma_counter from ESPState, Mark Cave-Ayland, 2021/02/09
[PATCH v2 13/42] esp: remove dma_left from ESPState, Mark Cave-Ayland, 2021/02/09
- Re: [PATCH v2 13/42] esp: remove dma_left from ESPState,
Philippe Mathieu-Daudé <=
[PATCH v2 14/42] esp: remove minlen restriction in handle_ti, Mark Cave-Ayland, 2021/02/09
[PATCH v2 15/42] esp: introduce esp_pdma_read() and esp_pdma_write() functions, Mark Cave-Ayland, 2021/02/09
[PATCH v2 16/42] esp: use pdma_origin directly in esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2021/02/09
[PATCH v2 17/42] esp: move pdma_len and TC logic into esp_pdma_read()/esp_pdma_write(), Mark Cave-Ayland, 2021/02/09