esp: consolidate esp_cmdfifo_pop() into esp_fifo_pop()
commitc5fef9112b15c4b5494791cdf8bbb40bc1938dd3
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 7 Apr 2021 19:57:53 +0000 (7 20:57 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 12 Apr 2021 21:34:02 +0000 (12 22:34 +0100)
tree11ecb9d685b0cce2d55f3714217ba71b5f036c4a
parente5455b8c1c6170c788f3c0fd577cc3be53539a99
esp: consolidate esp_cmdfifo_pop() into esp_fifo_pop()

Each FIFO currently has its own pop functions with the only difference being
the capacity check. The original reason for this was that the fifo8
implementation doesn't have a formal API for retrieving the FIFO capacity,
however there are multiple examples within QEMU where the capacity field is
accessed directly.

Change esp_fifo_pop() to access the FIFO capacity directly and then consolidate
esp_cmdfifo_pop() into esp_fifo_pop().

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20210407195801.685-5-mark.cave-ayland@ilande.co.uk>
hw/scsi/esp.c