qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support
@ 2013-05-19 11:27 Aurelien Jarno
  2013-05-19 14:33 ` Paolo Bonzini
  2013-05-19 14:49 ` Michael Tokarev
  0 siblings, 2 replies; 3+ messages in thread
From: Aurelien Jarno @ 2013-05-19 11:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Michael Tokarev, Christoph Hellwig, Aurelien Jarno

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 <mjt@tls.msk.ru>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 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;
     }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support
  2013-05-19 11:27 [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support Aurelien Jarno
@ 2013-05-19 14:33 ` Paolo Bonzini
  2013-05-19 14:49 ` Michael Tokarev
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2013-05-19 14:33 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Kevin Wolf, Michael Tokarev, qemu-devel, 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 <mjt@tls.msk.ru>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  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 <pbonzini@redhat.com>

Thanks!

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support
  2013-05-19 11:27 [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support Aurelien Jarno
  2013-05-19 14:33 ` Paolo Bonzini
@ 2013-05-19 14:49 ` Michael Tokarev
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2013-05-19 14:49 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Kevin Wolf, qemu-devel, Christoph Hellwig

19.05.2013 15:27, Aurelien Jarno wrote:
> 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 <mjt@tls.msk.ru>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Tested-off-by: Michael Tokarev <mjt@tls.msk.ru>

I can confirm with this patch the ppc testcase works again.

Thanks!

/mjt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-19 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-19 11:27 [Qemu-devel] [PATCH for 1.5] ide/macio: fix wrong opaque with TRIM support Aurelien Jarno
2013-05-19 14:33 ` Paolo Bonzini
2013-05-19 14:49 ` Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).