esp: use in-built TC to determine PDMA transfer length
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 4 Mar 2021 22:10:45 +0000 (22:10 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sun, 7 Mar 2021 10:39:05 +0000 (10:39 +0000)
commit3c421400fff80054aec9b805a0622b63e372f572
treebe012ab3966c86e5f9267846f33b3fb6d9327e04
parentad7f468c4252ee83f6e150c11ae02f71f6d467ef
esp: use in-built TC to determine PDMA transfer length

Real hardware simply counts down using the in-built TC to determine when the
the PDMA request is complete. Use the TC to determine the PDMA transfer length
which then enables us to remove the redundant pdma_len variable.

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-25-mark.cave-ayland@ilande.co.uk>
hw/scsi/esp.c
include/hw/scsi/esp.h