diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-12 01:04:27 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-08-12 01:04:27 +0000 |
commit | 4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9 (patch) | |
tree | 6217063ef291bd680f1c81a82bdaef7345356c16 /vl.h | |
parent | 4ca9c76f3620dc20e56d9b7027a6f1115ea48eea (diff) | |
download | qemu-4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9.zip qemu-4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9.tar.gz qemu-4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9.tar.bz2 |
SCSI and USB async IO support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.h')
-rw-r--r-- | vl.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1146,6 +1146,11 @@ void do_usb_del(const char *devname); void usb_info(void); /* scsi-disk.c */ +enum scsi_reason { + SCSI_REASON_DONE, /* Command complete. */ + SCSI_REASON_DATA /* Transfer complete, more data required. */ +}; + typedef struct SCSIDevice SCSIDevice; typedef void (*scsi_completionfn)(void *, uint32_t, int); @@ -1155,8 +1160,12 @@ SCSIDevice *scsi_disk_init(BlockDriverState *bdrv, void scsi_disk_destroy(SCSIDevice *s); int32_t scsi_send_command(SCSIDevice *s, uint32_t tag, uint8_t *buf, int lun); +/* SCSI data transfers are asynchrnonous. However, unlike the block IO + layer the completion routine may be called directly by + scsi_{read,write}_data. */ int scsi_read_data(SCSIDevice *s, uint8_t *data, uint32_t len); int scsi_write_data(SCSIDevice *s, uint8_t *data, uint32_t len); +void scsi_cancel_io(SCSIDevice *s); /* lsi53c895a.c */ void lsi_scsi_attach(void *opaque, BlockDriverState *bd, int id); |