aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-07-06 11:26:47 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-22 13:29:08 +0100
commit3d5aba97e9b3e92e8788e250de85080d15c7e8f9 (patch)
tree9d6e9bd3972f3a101cc22f6c14c38c3f26c9b7fb /hw/scsi.h
parent01e95455889780871374e1b72cd6919cfbd23399 (diff)
scsi: add scatter/gather functionality
Scatter/gather functionality uses the newly added DMA helpers. The device can choose between doing DMA itself, or calling scsi_req_data as usual, which will use the newly added DMA helpers to copy piecewise to/from the destination area(s). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index 8722ef9be4..34cdba8f69 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -49,6 +49,8 @@ struct SCSIRequest {
size_t resid;
SCSICommand cmd;
BlockDriverAIOCB *aiocb;
+ QEMUSGList *sg;
+ bool dma_started;
uint8_t sense[SCSI_SENSE_BUF_SIZE];
uint32_t sense_len;
bool enqueued;
@@ -115,6 +117,7 @@ struct SCSIBusInfo {
void (*transfer_data)(SCSIRequest *req, uint32_t arg);
void (*complete)(SCSIRequest *req, uint32_t arg, size_t resid);
void (*cancel)(SCSIRequest *req);
+ QEMUSGList *(*get_sg_list)(SCSIRequest *req);
};
struct SCSIBus {