esp: remove dma_counter from ESPState
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 4 Mar 2021 22:10:33 +0000 (22:10 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 7 Mar 2021 10:39:05 +0000 (10:39 +0000)
commit5eb7a23fb22f10f09cecba61e7bf61cecaee3f96
tree287d0f6f6a6c6ba6151c6ca9b1e92f0803709814
parent96676c2f749d9da99ee03ec0eee342bd7d09de26
esp: remove dma_counter from ESPState

The value of dma_counter is set once at the start of the transfer and remains
the same until the transfer is complete. This allows the check in esp_transfer_data
to be simplified since dma_left will always be non-zero until the transfer is
completed.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210304221103.6369-13-mark.cave-ayland@ilande.co.uk>
hw/scsi/esp.c
include/hw/scsi/esp.h