From 9ef2e93f9b1888c7d0deb4a105149138e6ad2e98 Mon Sep 17 00:00:00 2001 From: John Snow Date: Thu, 17 Sep 2015 14:17:05 -0400 Subject: atapi: abort transfers with 0 byte limits We're supposed to abort on transfers like this, unless we fill Word 125 of our IDENTIFY data with a default transfer size, which we don't currently do. This is an ATA error, not a SCSI/ATAPI one. See ATA8-ACS3 sections 7.17.6.49 or 7.21.5. If we don't do this, QEMU will loop forever trying to transfer zero bytes, which isn't particularly useful. Signed-off-by: John Snow Reviewed-by: Markus Armbruster Message-id: 1442253685-23349-2-git-send-email-jsnow@redhat.com --- hw/ide/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/ide/core.c') diff --git a/hw/ide/core.c b/hw/ide/core.c index 1cc6945d80..317406dca3 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -457,7 +457,7 @@ BlockAIOCB *ide_issue_trim(BlockBackend *blk, return &iocb->common; } -static inline void ide_abort_command(IDEState *s) +void ide_abort_command(IDEState *s) { ide_transfer_stop(s); s->status = READY_STAT | ERR_STAT; -- cgit 1.4.1