atapi: abort transfers with 0 byte limits
commit9ef2e93f9b1888c7d0deb4a105149138e6ad2e98
authorJohn Snow <jsnow@redhat.com>
Thu, 17 Sep 2015 18:17:05 +0000 (17 14:17 -0400)
committerJohn Snow <jsnow@redhat.com>
Fri, 18 Sep 2015 14:58:56 +0000 (18 10:58 -0400)
tree1599935bfbf94597a5369d13233966d117f35669
parentd9033e1d3aa666c5071580617a57bd853c5d794a
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 <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 1442253685-23349-2-git-send-email-jsnow@redhat.com
hw/ide/atapi.c
hw/ide/core.c
hw/ide/internal.h