[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM s
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support |
Date: |
Sun, 19 May 2013 16:33:47 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
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 <address@hidden>
> Cc: Kevin Wolf <address@hidden>
> Cc: Christoph Hellwig <address@hidden>
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---
> 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 <address@hidden>
Thanks!
Paolo