mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
da22132752
commit
01e9545588
6 changed files with 15 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue