History | View | Annotate | Download (16.8 kB)
char: rename qemu_chr_open() -> qemu_chr_new()
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: rename qemu_chr_close() -> qemu_chr_delete()
char: qemu_chr_ioctl() -> qemu_chr_fe_ioctl()
char: rename qemu_chr_write() -> qemu_chr_fe_write()
usb-serial: iovec support
Add full support for iovecs to usb-serial.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: use iovecs in USBPacket
Zap data pointer from USBPacket, add a QEMUIOVector instead.Add a bunch of helper functions to manage USBPacket data.Switch over users to the new interface.
Note that USBPacket->len was used for two purposes: First topass in the buffer size and second to return the number of...
Merge remote-tracking branch 'kraxel/migration.2' into staging
Correct spelling of licensed
Correct typos of "licenced" to "licensed".
Reviewed-by: Stefan Weil <weil@mail.berlios.de>Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de>Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb-serial doesn't support migration
usb: update config descriptors to identify number of interfaces
Previously we relied on the .bNumInterfaces, but that won't always beaccurate after the introduction of grouped interfaces.
Signed-off-by: Brad Hards <bradh@frogmouth.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: Pass the packet to the device's handle_control callback
This allows using the generic usb_generic_handle_packet function fromdevice code which does ASYNC control requests (such as the linux hostpass through code).
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
usb: move USB_REQ_SET_ADDRESS handling to common code
USB_REQ_SET_ADDRESS handling is identical in all emulated devices.Move it to common code.
usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code
This patch adds fields to the USBDevice struct for the currentspeed (hard-wired to full speed for now) and current deviceconfiguration. Also a init function is added which inializesthese fields. This allows USB_REQ_{GET,SET}_CONFIGURATION...
usb: move remote wakeup handling to common code
This patch moves setting and clearing the remote_wakeup featurebit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. AlsoUSB_REQ_GET_STATUS handling is moved to common code.
usb serial: use new descriptor infrastructure.
Switch the usb serial drivers (serial, braille) over to thenew descriptor infrastructure.
Note that this removes the freely configurable vendor and product idproperties. I think the only reason this was configurable is that the...
usb-serial: Fail instead of crash when chardev is missing
Signed-off-by: Markus Armbruster <armbru@redhat.com>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
usb: remove dead assignments, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
error: Replace qemu_error() by error_report()
error_report() terminates the message with a newline. Strip it itfrom its arguments.
This fixes a few error messages lacking a newline:net_handle_fd_param()'s "No file descriptor named %s found", andtap_open()'s "vnet_hdr=1 requested, but no kernel support for...
error: Move qemu_error & friends into their own header
Fix -usbdevice crash
If -usbdevice is used on a machine with no USB busses, usb_createwill fail and return NULL. Patch below handles this failure gracefullyrather than crashing when we try to init the device.
Signed-off-by: Paul Brook <paul@codesourcery.com>
segfault due to buffer overrun in usb-serial
This fixes a segfault due to buffer overrun in the usb-serial device.The memcpy was incrementing the start location by recv_used yet, thecomputation of first_size (how much to write at the end of the bufferbefore wrapping to the front) was not accounting for it. This causes the...
Fix QEMU_WARN_UNUSED_RESULT
Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it isconditional on a define from config-host.h which is included only later.Include that file earlier to get the warnings back.
Reactivating it unfortunately leads to some warnings about unused qdev_init...
qdev: Separate USB product description from qdev name
Using the qdev name for the product description makes for inconvenientqdev names.
Put the product description in new USBDeviceInfo member product_desc.Make usb_qdev_init() use it. No user or guest visible change, since...
qdev: Replace device names containing whitespace
Device names with whitespace require quoting in the shell and in themonitor. Some of the offenders are also overly long. Some have amore convenient alias, some don't.
The place for verbose device names is DeviceInfo member desc. The...
usb-serial and braille: use qdev for -usbdevice
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: rename CHR_EVENT_RESET to CHR_EVENT_OPENED
The char event RESET is emitted when a char device is opened.Give it a better name.
Patchworks-ID: 35287Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb: hook unplug into qdev, cleanups + fixes.
Hook into DeviceInfo->exit().
handle_destroy() must not free the state struct, this is handledby the new usb_qdev_exit() function now.
qdev_free(usb_device) works now.
Fix usb hub to qdev_free() all connected devices on unplug....
qdev/usb: add usb bus support to qdev, convert drivers.
TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs added by this patch....
usb-serial: implement break event.
Implement the serial break via usb serial.
The second data byte in ftdi status packet contains the break status.The values were already defined in usb-serial.c so it was a matter ofmaking use of the event_trigger to form a urb to send over to the host...
Replace gcc variadic macro extension with C99 version
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
add an init function parameter to qemu_chr_open()
And use it for the malta emulation. Fix segfault introduced inrevision 6352.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162
Implement "info chardev" command. (Gerd Hoffmann)
This patch makes qemu keep track of the character devices in use andimplements a "info chardev" monitor command to print a list.
qemu_chr_open() sticks the devices into a linked list now. It got a newargument (label), so there is a name for each device. It also assigns a...
[PATCH] usb-serial: Fix data corruption with usb serial emulation
Fix some warnings that would be generated by gcc -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
usb-serial: add support for modem lines
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4998 c046a42c-6fe2-441c-8c8c-71466251a162
Change the usb-serial product ID to a more widely recognised value (Samuel Thibault).Implement chr_close callback for "stdio" so that it can be closed and reopened.Free chr devices after they're closed.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3927 c046a42c-6fe2-441c-8c8c-71466251a162
USB-to-serial device (Samuel Thibault).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3914 c046a42c-6fe2-441c-8c8c-71466251a162