[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH] scsi-disk: fix reads from scsi-disk devices

From: xiaoqiang zhao
Subject: Re: [Qemu-block] [PATCH] scsi-disk: fix reads from scsi-disk devices
Date: Fri, 3 Jun 2016 14:10:19 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

在 2016年06月03日 13:17, Mark Cave-Ayland 写道:
Commit fcaafb1001b9c42817714dd3b2aadcfdb997b53d accidentally broke reads from
scsi-disk devices when being updated from its original form to use the new
byte-based block functions. Add the extra missing sector to offset conversion
in order to restore read functionality.

Signed-off-by: Mark Cave-Ayland <address@hidden>
  hw/scsi/scsi-disk.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index ace65e0..ab7cf9c 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -347,7 +347,7 @@ static void scsi_do_read(SCSIDiskReq *r, int ret)
          scsi_init_iovec(r, SCSI_DMA_BUF_SIZE);
          block_acct_start(blk_get_stats(s->qdev.conf.blk), &r->acct,
                           r->qiov.size, BLOCK_ACCT_READ);
-        r->req.aiocb = sdc->dma_readv(r->sector, &r->qiov,
+        r->req.aiocb = sdc->dma_readv(r->sector << BDRV_SECTOR_BITS, &r->qiov,
                                        scsi_read_complete, r, r);
This patch fix the qemu-system-arm booting issue.

Tested-by: xiaoqiang zhao <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]