From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0yzR-0005g9-8W for qemu-devel@nongnu.org; Tue, 06 Sep 2011 12:59:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0yzJ-0004Xv-Bm for qemu-devel@nongnu.org; Tue, 06 Sep 2011 12:59:13 -0400 Received: from oxygen.pond.sub.org ([78.46.104.156]:55945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0yzJ-0004XM-2W for qemu-devel@nongnu.org; Tue, 06 Sep 2011 12:59:05 -0400 From: Markus Armbruster Date: Tue, 6 Sep 2011 18:58:34 +0200 Message-Id: <1315328340-6192-2-git-send-email-armbru@redhat.com> In-Reply-To: <1315328340-6192-1-git-send-email-armbru@redhat.com> References: <1315328340-6192-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v3 01/27] ide: Fix ATA command READ to set ATAPI signature for CD-ROM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefano.stabellini@eu.citrix.com, lcapitulino@redhat.com, hare@suse.de, amit.shah@redhat.com, pbonzini@redhat.com, hch@lst.de 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 --- 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 1806e00..def0126 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -983,8 +983,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.6