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 /usb-linux.c | |
parent | 4ca9c76f3620dc20e56d9b7027a6f1115ea48eea (diff) | |
download | qemu-4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9.tar.gz qemu-4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9.tar.bz2 qemu-4d611c9a2f4c5d9080d8b6a6f0d7431233cd56f9.zip |
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 'usb-linux.c')
-rw-r--r-- | usb-linux.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usb-linux.c b/usb-linux.c index 0a13753d48..77436927cd 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -114,22 +114,21 @@ static int usb_host_handle_control(USBDevice *dev, } } -static int usb_host_handle_data(USBDevice *dev, int pid, - uint8_t devep, - uint8_t *data, int len) +static int usb_host_handle_data(USBDevice *dev, USBPacket *p) { USBHostDevice *s = (USBHostDevice *)dev; struct usbdevfs_bulktransfer bt; int ret; + uint8_t devep = p->devep; /* XXX: optimize and handle all data types by looking at the config descriptor */ - if (pid == USB_TOKEN_IN) + if (p->pid == USB_TOKEN_IN) devep |= 0x80; bt.ep = devep; - bt.len = len; + bt.len = p->len; bt.timeout = 50; - bt.data = data; + bt.data = p->data; ret = ioctl(s->fd, USBDEVFS_BULK, &bt); if (ret < 0) { switch(errno) { |