From patchwork Tue Apr 2 21:45:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 233169 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 915512C016A for ; Wed, 3 Apr 2013 09:03:50 +1100 (EST) Received: from localhost ([::1]:58549 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN9Iy-0000ge-Oh for incoming@patchwork.ozlabs.org; Tue, 02 Apr 2013 18:03:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN97d-0000eW-RL for qemu-devel@nongnu.org; Tue, 02 Apr 2013 17:52:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UN97c-0000SM-UR for qemu-devel@nongnu.org; Tue, 02 Apr 2013 17:52:05 -0400 Received: from mail-yh0-x22d.google.com ([2607:f8b0:4002:c01::22d]:34719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN97c-0000SG-Qg; Tue, 02 Apr 2013 17:52:04 -0400 Received: by mail-yh0-f45.google.com with SMTP id i21so137531yha.4 for ; Tue, 02 Apr 2013 14:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:mime-version:content-type :content-transfer-encoding; bh=2YjkeM8uTbyDfT06sJuVCySgTLPVaK6AY0ttcEbF4X8=; b=YJwg863B/5EC+qgqlLoTfAVp7cxrA2XqwrSQ3BqYa36m5HzWNyqRUURqwRTKlA5amc cj6IfqiHleB4lSGfrNoTSw7cIW5nGzWH7i++C/qk5Vyh90xpfdjv6cQenGJv+NIUjx34 dcB5L2KZdSJg7VHuoCQSiDrWZFpqRUqWFceidrrfb0smSopmf055aRfoDIGqNIV6Mud4 dE6+rnliuhWELm+BOVBKNWN8kaCw3SThAMEPFITyY86bLxG7zaIzUX8pSxanSVtJ4w6r cQ9mZqMYCBsd41XZ46/Oxbvsev2/gBBdwT0e+Zpo2G+tiep8h43QNPVlb1XfX2R0+7G2 0tlA== X-Received: by 10.236.152.102 with SMTP id c66mr17025822yhk.72.1364939524289; Tue, 02 Apr 2013 14:52:04 -0700 (PDT) Received: from localhost ([32.97.110.51]) by mx.google.com with ESMTPS id b78sm5831321yhi.2.2013.04.02.14.52.03 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 02 Apr 2013 14:52:03 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 2 Apr 2013 16:45:32 -0500 Message-Id: <1364939142-30066-28-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1364939142-30066-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1364939142-30066-1-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4002:c01::22d Cc: qemu-stable@nongnu.org Subject: [Qemu-devel] [PATCH 27/37] ide/macio: Fix macio DMA initialisation. 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 From: Mark Cave-Ayland Commit 07a7484e5d713f1eb7c1c37b18a8ab0d56d88875 accidentally introduced a bug in the initialisation of the second macio DMA device which could cause some DMA operations to segfault QEMU. CC: Andreas Färber Signed-off-by: Mark Cave-Ayland Acked-by: Andreas Färber Signed-off-by: Stefan Hajnoczi (cherry picked from commit 02d583c7232d65920634f7553700eb348f84e472) Signed-off-by: Michael Roth --- hw/macio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/macio.c b/hw/macio.c index 74bdcd1..0c6a6b8 100644 --- a/hw/macio.c +++ b/hw/macio.c @@ -188,7 +188,7 @@ static int macio_newworld_initfn(PCIDevice *d) sysbus_dev = SYS_BUS_DEVICE(&ns->ide[1]); sysbus_connect_irq(sysbus_dev, 0, ns->irqs[3]); sysbus_connect_irq(sysbus_dev, 1, ns->irqs[4]); - macio_ide_register_dma(&ns->ide[0], s->dbdma, 0x1a); + macio_ide_register_dma(&ns->ide[1], s->dbdma, 0x1a); ret = qdev_init(DEVICE(&ns->ide[1])); if (ret < 0) { return ret;