OSDN Git Service

esp: ensure PDMA write transfers are flushed from the FIFO to the target immediately
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 19 May 2021 10:08:01 +0000 (11:08 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Jun 2021 15:17:09 +0000 (17:17 +0200)
commite62a959afd2b1a13b27dda9d03f10c7feb36aa9b
treec44b4b480c2ad3455098c124c03a42a2a3feae81
parent6ef2cabc7c4231207cfbac326853c0242d9c4617
esp: ensure PDMA write transfers are flushed from the FIFO to the target immediately

After each PDMA write transfer the MacOS CDROM driver waits until the FIFO is empty
(i.e. its contents have been written out to the SCSI bus) by polling the FIFO count
register until it reads 0. This doesn't work with the current PDMA write
implementation which waits until either the FIFO is full or the transfer is complete
before invoking the PDMA callback to process the FIFO contents.

Change the PDMA write transfer logic so that the PDMA callback is invoked after each
PDMA write to transfer the FIFO contents to the target buffer immediately, and hence
avoid getting stuck in the FIFO count register polling loop.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20210519100803.10293-4-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/esp.c