diff options
author | Mark Cave-Ayland | 2016-10-27 22:29:13 +0200 |
---|---|---|
committer | John Snow | 2016-10-27 22:29:13 +0200 |
commit | 99868af3d0a75cf6a515a9aa81bf0d7bcb39eadb (patch) | |
tree | d5763d2625f5f74ecd5e750b76c5017ce67d39eb /hw/scsi | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20161027-1' into... (diff) | |
download | qemu-99868af3d0a75cf6a515a9aa81bf0d7bcb39eadb.tar.gz qemu-99868af3d0a75cf6a515a9aa81bf0d7bcb39eadb.tar.xz qemu-99868af3d0a75cf6a515a9aa81bf0d7bcb39eadb.zip |
dma-helpers: explicitly pass alignment into DMA helpers
The hard-coded default alignment is BDRV_SECTOR_SIZE, however this is not
necessarily the case for all platforms. Use this as the default alignment for
all current callers.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Message-id: 1476445266-27503-2-git-send-email-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r-- | hw/scsi/scsi-disk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 88beaf4bb8..a96319138a 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -341,6 +341,7 @@ static void scsi_do_read(SCSIDiskReq *r, int ret) r->req.resid -= r->req.sg->size; r->req.aiocb = dma_blk_io(blk_get_aio_context(s->qdev.conf.blk), r->req.sg, r->sector << BDRV_SECTOR_BITS, + BDRV_SECTOR_SIZE, sdc->dma_readv, r, scsi_dma_complete, r, DMA_DIRECTION_FROM_DEVICE); } else { @@ -539,6 +540,7 @@ static void scsi_write_data(SCSIRequest *req) r->req.resid -= r->req.sg->size; r->req.aiocb = dma_blk_io(blk_get_aio_context(s->qdev.conf.blk), r->req.sg, r->sector << BDRV_SECTOR_BITS, + BDRV_SECTOR_SIZE, sdc->dma_writev, r, scsi_dma_complete, r, DMA_DIRECTION_TO_DEVICE); } else { |