From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4gP-0001NE-Lu for qemu-devel@nongnu.org; Sun, 19 May 2013 10:33:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ue4gO-0002ig-HF for qemu-devel@nongnu.org; Sun, 19 May 2013 10:33:57 -0400 Received: from mail-ea0-x234.google.com ([2a00:1450:4013:c01::234]:35553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ue4gO-0002ic-BN for qemu-devel@nongnu.org; Sun, 19 May 2013 10:33:56 -0400 Received: by mail-ea0-f180.google.com with SMTP id g10so3329093eak.11 for ; Sun, 19 May 2013 07:33:55 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5198E2CB.7070206@redhat.com> Date: Sun, 19 May 2013 16:33:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1368962825-553-1-git-send-email-aurelien@aurel32.net> In-Reply-To: <1368962825-553-1-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Kevin Wolf , Michael Tokarev , qemu-devel@nongnu.org, Christoph Hellwig Il 19/05/2013 13:27, Aurelien Jarno ha scritto: > Commit 215e47b9 enabled TRIM by default, which revealed a bug in TRIM > support for the IDE macio emulation driver, introduced in d353fb72. > > The call to dma_bdrv_io() is using a wrong opaque of type IDEState > instead of DBDMA_io. This patch fixes that. > > Fixes LP#1179104 > > Reported-by: Michael Tokarev > Cc: Kevin Wolf > Cc: Christoph Hellwig > Signed-off-by: Aurelien Jarno > --- > hw/ide/macio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/ide/macio.c b/hw/ide/macio.c > index bf12a10..e1e4f41 100644 > --- a/hw/ide/macio.c > +++ b/hw/ide/macio.c > @@ -144,7 +144,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) > break; > case IDE_DMA_TRIM: > m->aiocb = dma_bdrv_io(s->bs, &s->sg, sector_num, > - ide_issue_trim, pmac_ide_transfer_cb, s, > + ide_issue_trim, pmac_ide_transfer_cb, io, > DMA_DIRECTION_TO_DEVICE); > break; > } > Reviewed-by: Paolo Bonzini Thanks! Paolo