aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2011-04-18 13:36:02 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2011-05-26 12:14:16 +0200
commit74382217ca8f25a530c9f63e6b523e6259d7719a (patch)
tree5075f9599c392fde8019c06a293662ee27922ea1 /hw/scsi.h
parent0c34459b6af1b7ed2f000995b9bcb1c722646fbb (diff)
scsi: Implement 'get_sense' callback
The get_sense callback copies existing sense information into the provided buffer. This is required if sense information should be transferred together with the command response. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index edf68283c1..5730faa553 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -80,6 +80,7 @@ struct SCSIDeviceInfo {
int (*write_data)(SCSIRequest *req);
void (*cancel_io)(SCSIRequest *req);
uint8_t *(*get_buf)(SCSIRequest *req);
+ int (*get_sense)(SCSIRequest *req, uint8_t *buf, int len);
};
struct SCSIBusOps {
@@ -155,6 +156,7 @@ void scsi_req_continue(SCSIRequest *req);
void scsi_req_data(SCSIRequest *req, int len);
void scsi_req_complete(SCSIRequest *req);
uint8_t *scsi_req_get_buf(SCSIRequest *req);
+int scsi_req_get_sense(SCSIRequest *req, uint8_t *buf, int len);
void scsi_req_abort(SCSIRequest *req, int status);
void scsi_req_cancel(SCSIRequest *req);
void scsi_device_purge_requests(SCSIDevice *sdev);