Statistics
| Branch: | Revision:

root / hw / usb-serial.c @ 74382217

History | View | Annotate | Download (16.4 kB)

# Date Author Comment
41c6abbd 01/11/2011 04:56 pm Gerd Hoffmann

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.

Signed-off-by: Gerd Hoffmann <>

a980a065 01/11/2011 04:56 pm Gerd Hoffmann

usb: move USB_REQ_{GET,SET}_CONFIGURATION handling to common code

This patch adds fields to the USBDevice struct for the current
speed (hard-wired to full speed for now) and current device
configuration. Also a init function is added which inializes
these fields. This allows USB_REQ_{GET,SET}_CONFIGURATION...

ed5a83dd 01/11/2011 04:56 pm Gerd Hoffmann

usb: move remote wakeup handling to common code

This patch moves setting and clearing the remote_wakeup feature
bit (via USB_REQ_{SET,CLEAR}_FEATURE) to common code. Also
USB_REQ_GET_STATUS handling is moved to common code.

Signed-off-by: Gerd Hoffmann <>

f29783f7 01/11/2011 04:56 pm Gerd Hoffmann

usb serial: use new descriptor infrastructure.

Switch the usb serial drivers (serial, braille) over to the
new descriptor infrastructure.

Note that this removes the freely configurable vendor and product id
properties. I think the only reason this was configurable is that the...

81bf96d3 06/30/2010 09:35 pm Markus Armbruster

usb-serial: Fail instead of crash when chardev is missing

Signed-off-by: Markus Armbruster <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Aurelien Jarno <>

d4c4e6fd 04/25/2010 09:23 pm Blue Swirl

usb: remove dead assignments, spotted by clang analyzer

Value stored is never read.

Signed-off-by: Blue Swirl <>

1ecda02b 03/16/2010 05:58 pm Markus Armbruster

error: Replace qemu_error() by error_report()

error_report() terminates the message with a newline. Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for...

2f792016 03/16/2010 05:55 pm Markus Armbruster

error: Move qemu_error & friends into their own header

d44168ff 02/25/2010 03:29 pm Paul Brook

Fix -usbdevice crash

If -usbdevice is used on a machine with no USB busses, usb_create
will fail and return NULL. Patch below handles this failure gracefully
rather than crashing when we try to init the device.

Signed-off-by: Paul Brook <>

4ab4183d 02/10/2010 08:45 pm David S. Ahern

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, the
computation of first_size (how much to write at the end of the buffer
before wrapping to the front) was not accounting for it. This causes the...

beb6f0de 01/20/2010 12:31 am Kevin Wolf

Fix QEMU_WARN_UNUSED_RESULT

Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it is
conditional 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...

06384698 12/12/2009 03:59 pm Markus Armbruster

qdev: Separate USB product description from qdev name

Using the qdev name for the product description makes for inconvenient
qdev names.

Put the product description in new USBDeviceInfo member product_desc.
Make usb_qdev_init() use it. No user or guest visible change, since...

556cd098 12/12/2009 03:59 pm Markus Armbruster

qdev: Replace device names containing whitespace

Device names with whitespace require quoting in the shell and in the
monitor. Some of the offenders are also overly long. Some have a
more convenient alias, some don't.

The place for verbose device names is DeviceInfo member desc. The...

2b0efdc3 10/30/2009 03:39 pm Gerd Hoffmann

usb-serial and braille: use qdev for -usbdevice

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

b6b8df56 10/21/2009 09:35 pm Amit Shah

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: 35287
Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

a8e662b5 10/05/2009 05:32 pm Gerd Hoffmann

usb: hook unplug into qdev, cleanups + fixes.

Hook into DeviceInfo->exit().

handle_destroy() must not free the state struct, this is handled
by the new usb_qdev_exit() function now.

qdev_free(usb_device) works now.

Fix usb hub to qdev_free() all connected devices on unplug....

806b6024 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: add usb bus support to qdev, convert drivers.

  • Add USBBus. * Add USBDeviceInfo, move device callbacks here. * Add usb-qdev helper functions. * Switch drivers to qdev.

TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch....

7e57f049 05/22/2009 06:50 pm Jason Wessel

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 of
making use of the event_trigger to form a urb to send over to the host...

001faf32 05/13/2009 08:53 pm Blue Swirl

Replace gcc variadic macro extension with C99 version

Signed-off-by: Blue Swirl <>

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

ceecf1d1 01/18/2009 04:08 pm aurel32

add an init function parameter to qemu_chr_open()

And use it for the malta emulation. Fix segfault introduced in
revision 6352.

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6365 c046a42c-6fe2-441c-8c8c-71466251a162

5ccfae10 10/31/2008 07:31 pm aliguori

Implement "info chardev" command. (Gerd Hoffmann)

This patch makes qemu keep track of the character devices in use and
implements a "info chardev" monitor command to print a list.

qemu_chr_open() sticks the devices into a linked list now. It got a new
argument (label), so there is a name for each device. It also assigns a...

8109b9b6 09/18/2008 01:04 am aurel32

[PATCH] usb-serial: Fix data corruption with usb serial emulation

  • Remove the unused send_buf variable and its constant.
  • Fix a math error
    The variables recv_ptr and recv_used are not large enough to hold
    the constant 384, which causes data corruption when the pointer is...
8fcd3692 08/17/2008 11:26 pm blueswir1

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

abb8a139 08/13/2008 07:23 am aurel32

usb-serial: add support for modem lines

Signed-off-by: Samuel Thibault <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4998 c046a42c-6fe2-441c-8c8c-71466251a162

a11d070e 01/19/2008 03:00 pm balrog

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

a7954218 01/14/2008 05:41 am balrog

USB-to-serial device (Samuel Thibault).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3914 c046a42c-6fe2-441c-8c8c-71466251a162