aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-02-18 17:09:26 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2019-02-22 09:42:13 +0000
commit9942586b3f1879244d51de4efb44e18b93514b9a (patch)
tree604cd3427bc08e0147fcac3df4ee4ba192a1011e /hw/ide
parent5bbe9325a07520dbeadcc96b02a3b8f471f73e4a (diff)
hw/ide: drop iov field from IDEDMA
@iov is used only to initialize @qiov. Let's use new qemu_iovec_init_buf() instead, which simplifies the code. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20190218140926.333779-18-vsementsov@virtuozzo.com Message-Id: <20190218140926.333779-18-vsementsov@virtuozzo.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/atapi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c
index 4de86555d9..1b0f66cc08 100644
--- a/hw/ide/atapi.c
+++ b/hw/ide/atapi.c
@@ -420,9 +420,8 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret)
data_offset = 0;
}
trace_ide_atapi_cmd_read_dma_cb_aio(s, s->lba, n);
- s->bus->dma->iov.iov_base = (void *)(s->io_buffer + data_offset);
- s->bus->dma->iov.iov_len = n * ATAPI_SECTOR_SIZE;
- qemu_iovec_init_external(&s->bus->dma->qiov, &s->bus->dma->iov, 1);
+ qemu_iovec_init_buf(&s->bus->dma->qiov, s->io_buffer + data_offset,
+ n * ATAPI_SECTOR_SIZE);
s->bus->dma->aiocb = ide_buffered_readv(s, (int64_t)s->lba << 2,
&s->bus->dma->qiov, n * 4,