OSDN Git Service

esp: consolidate esp_cmdfifo_push() into esp_fifo_push()
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 7 Apr 2021 19:57:52 +0000 (20:57 +0100)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Mon, 12 Apr 2021 21:34:02 +0000 (22:34 +0100)
commite5455b8c1c6170c788f3c0fd577cc3be53539a99
treeb4081335de1ce57cc57d187cfab028f028d1e393
parente392255766071c8cac480da3a9ae4f94e56d7cbc
esp: consolidate esp_cmdfifo_push() into esp_fifo_push()

Each FIFO currently has its own push 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_push() to access the FIFO capacity directly and then consolidate
esp_cmdfifo_push() into esp_fifo_push().

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