]> git.proxmox.com Git - mirror_qemu.git/commit - hw/scsi-bus.c
scsi: push request restart to SCSIDevice
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 25 Oct 2011 10:53:36 +0000 (12:53 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 28 Oct 2011 17:25:52 +0000 (19:25 +0200)
commit71544d30a6f8b91574552a61cd5bd122a77e82d1
tree7c39af913f1105f9561b75895873b69d72e6b4bb
parentc9501c951c3dbe007dfba9328156be2d931f6d94
scsi: push request restart to SCSIDevice

The request restart mechanism is generic and could be reused for
scsi-generic.  In the meanwhile, pushing it to SCSIDevice avoids
that scsi_dma_restart_bh looks at SCSIGenericReqs when working on
a scsi-block device.

The code is the same that is already in hw/scsi-disk.c, with
the type flags replaced by req->cmd.mode and a more generic way to
requeue SCSI_XFER_NONE commands.

I also added a missing call to qemu_del_vm_change_state_handler.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/scsi-bus.c
hw/scsi-disk.c
hw/scsi.h