summaryrefslogtreecommitdiff
path: root/hw/spapr_vscsi.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-07-06 11:55:37 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-22 13:29:07 +0100
commit01e95455889780871374e1b72cd6919cfbd23399 (patch)
tree402da6c430ccf8c2e8169201c920631786d69386 /hw/spapr_vscsi.c
parentda2213275237a35d1e063db7d6d820905e7d4084 (diff)
downloadqemu-01e95455889780871374e1b72cd6919cfbd23399.tar.gz
scsi: pass residual amount to command_complete
With the upcoming sglist support, HBAs will not see any transfer_data call and will not have a way to detect short transfers. So pass the residual amount of data upon command completion. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/spapr_vscsi.c')
-rw-r--r--hw/spapr_vscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/spapr_vscsi.c b/hw/spapr_vscsi.c
index ffce261f98..21670170e8 100644
--- a/hw/spapr_vscsi.c
+++ b/hw/spapr_vscsi.c
@@ -494,7 +494,7 @@ static void vscsi_transfer_data(SCSIRequest *sreq, uint32_t len)
}
/* Callback to indicate that the SCSI layer has completed a transfer. */
-static void vscsi_command_complete(SCSIRequest *sreq, uint32_t status)
+static void vscsi_command_complete(SCSIRequest *sreq, uint32_t status, size_t resid)
{
VSCSIState *s = DO_UPCAST(VSCSIState, vdev.qdev, sreq->bus->qbus.parent);
vscsi_req *req = sreq->hba_private;