mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
01e9545588
commit
3d5aba97e9
2 changed files with 29 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue