From patchwork Mon Mar 30 11:45:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 456076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2B10414011D for ; Mon, 30 Mar 2015 22:46:23 +1100 (AEDT) Received: from localhost ([::1]:33238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcY97-0006yC-3q for incoming@patchwork.ozlabs.org; Mon, 30 Mar 2015 07:46:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcY8J-0005n2-3i for qemu-devel@nongnu.org; Mon, 30 Mar 2015 07:45:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YcY8H-0001up-Oc for qemu-devel@nongnu.org; Mon, 30 Mar 2015 07:45:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YcY8H-0001ua-75 for qemu-devel@nongnu.org; Mon, 30 Mar 2015 07:45:29 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id CAECAC9B17; Mon, 30 Mar 2015 11:45:28 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-40.ams2.redhat.com [10.36.112.40]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2UBjILk017526; Mon, 30 Mar 2015 07:45:26 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 30 Mar 2015 13:45:15 +0200 Message-Id: <1427715918-25768-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1427715918-25768-1-git-send-email-pbonzini@redhat.com> References: <1427715918-25768-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, Mark Cave-Ayland , John Snow Subject: [Qemu-devel] [PATCH for-2.3 3/6] ide: there is only one data port X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org IDE PIO data must be written, for example, at 0x1f0. You cannot do word or dword writes to 0x1f1..0x1f3 to access the data register. Adjust the ide_portio_list accordingly. Cc: John Snow Signed-off-by: Paolo Bonzini --- hw/ide/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index a895fd8..fcb9080 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2436,8 +2436,8 @@ void ide_init2(IDEBus *bus, qemu_irq irq) static const MemoryRegionPortio ide_portio_list[] = { { 0, 8, 1, .read = ide_ioport_read, .write = ide_ioport_write }, - { 0, 2, 2, .read = ide_data_readw, .write = ide_data_writew }, - { 0, 4, 4, .read = ide_data_readl, .write = ide_data_writel }, + { 0, 1, 2, .read = ide_data_readw, .write = ide_data_writew }, + { 0, 1, 4, .read = ide_data_readl, .write = ide_data_writel }, PORTIO_END_OF_LIST(), };