From patchwork Wed Oct 7 14:56:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 35307 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 1D314B7B9D for ; Thu, 8 Oct 2009 02:26:15 +1100 (EST) Received: from localhost ([127.0.0.1]:54560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvYP5-0000pt-Qd for incoming@patchwork.ozlabs.org; Wed, 07 Oct 2009 11:26:11 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvXx3-0003F3-Si for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:57:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvXwu-00030b-Bb for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:57:09 -0400 Received: from [199.232.76.173] (port=55166 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvXwu-00030O-3f for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4377) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvXwt-0003gJ-Kv for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:57:03 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97Ev2VZ004381 for ; Wed, 7 Oct 2009 10:57:03 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n97Eulnx016943; Wed, 7 Oct 2009 10:57:02 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 7 Oct 2009 16:56:28 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 11/12] ide: cmd646 ->unit has just the value that we want 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 Signed-off-by: Juan Quintela --- hw/ide/cmd646.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index a36c3b5..4af1954 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -94,7 +94,7 @@ static uint32_t bmdma_readb(void *opaque, uint32_t addr) val = bm->status; break; case 3: - if (bm == &pci_dev->bmdma[0]) { + if (bm->unit == 0) { val = pci_dev->dev.config[UDIDETCR0]; } else { val = pci_dev->dev.config[UDIDETCR1]; @@ -127,7 +127,7 @@ static void bmdma_writeb(void *opaque, uint32_t addr, uint32_t val) bm->status = (val & 0x60) | (bm->status & 1) | (bm->status & ~val & 0x06); break; case 3: - if (bm == &pci_dev->bmdma[0]) + if (bm->unit == 0) pci_dev->dev.config[UDIDETCR0] = val; else pci_dev->dev.config[UDIDETCR1] = val;