The DIAGNOSE command in the qemu IDE implementation has an error when
use dfor packet devices.
The status register value is dependant on the drive being a packet
device or not, this patch corrects the returned status.
From the ATA/PI specification (V6 draft):
"If the device implements the PACKET command feature set, the device
SHALL clear bits 6,5,4,3,2 and 0 in the Status register to zero."
A selection of physical devices have been checked and do conform to
the specifications behaviour.
Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5452 c046a42c-6fe2-441c-8c8c-71466251a162
If it does not, abort the command immediately rather than dropping
it on the floor.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5369 c046a42c-6fe2-441c-8c8c-71466251a162
This patch makes the ide emulation actually take notice of
error returns from bdrv_write and bdrv_aio_{read,write}.
(Cherry picked from qemu-xen e0e7a0afe0e324a1f7d64c240f567b15dbe454cf,
first posted to qemu-devel Wed, 20 Feb 2008 15:26:41 +0000)
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5368 c046a42c-6fe2-441c-8c8c-71466251a162
Feature, Sector Count, LBA Low/Mid/High and Device registers should be
written only when both BSY and DRQ are cleared to zero.
Command register shall only be written when BSY and DRQ are set to zero
for all commands except DEVICE RESET.
Data Port register shall be accessed for host PIO data transfer only when
DRQ is set to one.
Signed-off-by: Gleb Natapov <gleb@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5060 c046a42c-6fe2-441c-8c8c-71466251a162
Cancel AIO in IDE layer on device rest in order to be in deterministic state
during next boot.
Signed-off-by: Gleb Natapov <gleb@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5011 c046a42c-6fe2-441c-8c8c-71466251a162
Add SEEK_STAT in all non-error cases except sleep request, since our
seek times are virtually 0. Although this flag is deprecated by newer
ATA standards, Linux at least checks it for CD drives, and would timeout
in some case if we do not set it.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4994 c046a42c-6fe2-441c-8c8c-71466251a162
The current implementation of GET_CONFIGURATION in the ATAPI stack of qemu
replies a different length depending on the buffer, the data should be
written into.
On the other hand the SCSI spec defines that length information has to be
consistent and independent of return buffer lengths.
This patch makes the ATAPI emulation behave according to the spec and fixes
the Darwin DVD driver.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@suse.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4649 c046a42c-6fe2-441c-8c8c-71466251a162