From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51702 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTeNQ-0001FH-Jo for qemu-devel@nongnu.org; Fri, 17 Dec 2010 12:46:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTeM2-00034u-6q for qemu-devel@nongnu.org; Fri, 17 Dec 2010 12:45:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTeM1-00034h-WB for qemu-devel@nongnu.org; Fri, 17 Dec 2010 12:44:30 -0500 From: Kevin Wolf Date: Fri, 17 Dec 2010 18:44:32 +0100 Message-Id: <1292607893-13461-18-git-send-email-kwolf@redhat.com> In-Reply-To: <1292607893-13461-1-git-send-email-kwolf@redhat.com> References: <1292607893-13461-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 17/38] ide: honor ncq for atapi List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Alexander Graf ATAPI also can do ncq, so let's expose the capability. This patch makes CD-ROM support work on Windows 7 for me. Signed-off-by: Alexander Graf Signed-off-by: Kevin Wolf --- hw/ide/core.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 9e1d4e6..9496e99 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -217,6 +217,12 @@ static void ide_atapi_identify(IDEState *s) put_le16(p + 71, 30); /* in ns */ put_le16(p + 72, 30); /* in ns */ + if (s->ncq_queues) { + put_le16(p + 75, s->ncq_queues - 1); + /* NCQ supported */ + put_le16(p + 76, (1 << 8)); + } + put_le16(p + 80, 0x1e); /* support up to ATA/ATAPI-4 */ #ifdef USE_DMA_CDROM put_le16(p + 88, 0x3f | (1 << 13)); /* udma5 set and supported */ -- 1.7.2.3