From patchwork Fri Sep 3 12:57:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jonathan A. Kollasch" X-Patchwork-Id: 63677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0DD25B7182 for ; Fri, 3 Sep 2010 22:58:34 +1000 (EST) Received: from localhost ([127.0.0.1]:46112 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrVqh-0004S3-FY for incoming@patchwork.ozlabs.org; Fri, 03 Sep 2010 08:58:31 -0400 Received: from [140.186.70.92] (port=44030 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrVq6-0004RP-VX for qemu-devel@nongnu.org; Fri, 03 Sep 2010 08:57:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrVq5-0000YQ-Oi for qemu-devel@nongnu.org; Fri, 03 Sep 2010 08:57:54 -0400 Received: from poghril.kollasch.net ([68.68.99.156]:57597) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrVq5-0000Y9-HN for qemu-devel@nongnu.org; Fri, 03 Sep 2010 08:57:53 -0400 Received: from mail.kollasch.net (mail.kollasch.net [IPv6:2001:4978:1f7:410:0:454d:4149:4c30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.kollasch.net", Issuer "CAcert Class 3 Root" (verified OK)) by poghril.kollasch.net (Postfix) with ESMTPS id E0457772 for ; Fri, 3 Sep 2010 12:57:51 +0000 (UTC) Received: from siwenna.kollasch.net (siwenna.kollasch.net [IPv6:2001:470:c003:410:216:e3ff:fef3:2a95]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jakllsch@KOLLASCH.NET) by mail.kollasch.net (Postfix) with ESMTPSA id 85FC92FC12; Fri, 3 Sep 2010 12:57:49 +0000 (UTC) From: "Jonathan A. Kollasch" To: qemu-devel@nongnu.org Date: Fri, 3 Sep 2010 07:57:46 -0500 Message-Id: <1283518666-16214-1-git-send-email-jakllsch@kollasch.net> X-Mailer: git-send-email 1.6.6.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: "Jonathan A. Kollasch" Subject: [Qemu-devel] [PATCH v2] Improve ATA IDENTIFY word 64 contents. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Fill in word 64 of IDENTIFY data to indicate support for PIO modes 3 and 4. This allows NetBSD guests to use UltraDMA modes instead of just PIO mode 0. Signed-off-by: Jonathan A. Kollasch --- hw/ide/core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 3651d2b..1e466d1 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -139,6 +139,7 @@ static void ide_identify(IDEState *s) put_le16(p + 61, s->nb_sectors >> 16); put_le16(p + 62, 0x07); /* single word dma0-2 supported */ put_le16(p + 63, 0x07); /* mdma0-2 supported */ + put_le16(p + 64, 0x03); /* pio3-4 supported */ put_le16(p + 65, 120); put_le16(p + 66, 120); put_le16(p + 67, 120); @@ -199,13 +200,12 @@ static void ide_atapi_identify(IDEState *s) put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */ put_le16(p + 62, 7); /* single word dma0-2 supported */ put_le16(p + 63, 7); /* mdma0-2 supported */ - put_le16(p + 64, 0x3f); /* PIO modes supported */ #else put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */ put_le16(p + 53, 3); /* words 64-70, 54-58 valid */ put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */ - put_le16(p + 64, 1); /* PIO modes */ #endif + put_le16(p + 64, 3); /* pio3-4 supported */ put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */ put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */ put_le16(p + 67, 0x12c); /* minimum PIO cycle time without flow control */