summary refs log tree commit diff stats
path: root/hw/scsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi.h')
-rw-r--r--hw/scsi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index c5b30b82b2..f0aaed59a3 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -24,6 +24,10 @@ enum SCSIXferMode {
     SCSI_XFER_TO_DEV,    /*  WRITE, MODE_SELECT, ...         */
 };
 
+typedef struct SCSISense {
+    uint8_t key;
+} SCSISense;
+
 typedef struct SCSIRequest {
     SCSIBus           *bus;
     SCSIDevice        *dev;
@@ -48,6 +52,7 @@ struct SCSIDevice
     QTAILQ_HEAD(, SCSIRequest) requests;
     int blocksize;
     int type;
+    struct SCSISense sense;
 };
 
 /* cdrom.c */
@@ -92,9 +97,13 @@ static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)
 SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, DriveInfo *dinfo, int unit);
 void scsi_bus_legacy_handle_cmdline(SCSIBus *bus);
 
+void scsi_dev_clear_sense(SCSIDevice *dev);
+void scsi_dev_set_sense(SCSIDevice *dev, uint8_t key);
+
 SCSIRequest *scsi_req_alloc(size_t size, SCSIDevice *d, uint32_t tag, uint32_t lun);
 SCSIRequest *scsi_req_find(SCSIDevice *d, uint32_t tag);
 void scsi_req_free(SCSIRequest *req);
+
 int scsi_req_parse(SCSIRequest *req, uint8_t *buf);
 
 #endif