diff options
Diffstat (limited to 'hw/scsi.h')
-rw-r--r-- | hw/scsi.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |