diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-11-26 15:33:58 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 09:41:37 -0600 |
commit | 37659e510483fd8758424356b76209124ccfd98c (patch) | |
tree | 087b227ecc8712498a12938259331570eb943853 /hw/scsi.h | |
parent | 97a064356704af1756270b1d56dea2690ae015de (diff) |
scsi: move sense to SCSIDevice, create SCSISense struct.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 |