From 4aff186618791816a73ec60770686061eb7c8077 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 4 Oct 2011 16:24:30 +0200 Subject: [PATCH 55/76] ide: Fix ATA command READ to set ATAPI signature for CD-ROM RH-Author: Markus Armbruster Message-id: <1317745491-18401-48-git-send-email-armbru@redhat.com> Patchwork-id: 33639 O-Subject: [PATCH RHEL-6.2 qemu-kvm 47/68] ide: Fix ATA command READ to set ATAPI signature for CD-ROM Bugzilla: 742458 RH-Acked-by: Paolo Bonzini RH-Acked-by: Amit Shah RH-Acked-by: Juan Quintela Must set the ATAPI device signature, see ATA4 8.27.5.2 Outputs for PACKET Command feature set devices, and ACS-2 7.36.6 Outputs for PACKET feature set devices. Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf (cherry picked from commit 3f76a7c3815716d21b9932b892825309bf477ee8) --- hw/ide/core.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny --- hw/ide/core.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index beb2292..2881325 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1035,8 +1035,10 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) lba48 = 1; case WIN_READ: case WIN_READ_ONCE: - if (!s->bs) + if (s->drive_kind == IDE_CD) { + ide_set_signature(s); /* odd, but ATA4 8.27.5.2 requires it */ goto abort_cmd; + } ide_cmd_lba48_transform(s, lba48); s->req_nb_sectors = 1; ide_sector_read(s); -- 1.7.4.4