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-ayl...@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é <f4...@amsat.org>