History | View | Annotate | Download (7.3 kB)
usb: remove dead assignments, spotted by clang analyzer
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
usb-bus: fix no params
After commit 702f3e0fb52c124c07f215426eeadb70a716643f, the params isnerver NULL. It should check *params instead of params to determinewhether the params is empty.
Signed-off-by: TeLeMan <geleman@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Avoid crash on '-usbdevice <device>' without parameters
Many usbdevice_init implementors assume params is non-NULL.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.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...
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>
qdev: Rename USBDevice member devname to product_desc
It's not a device name, it's the USB product description string.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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: print attached status in info qtree
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
usb: make attach optional.
Add a auto_attach field to USBDevice, which is enabled by default.USB drivers can clear this field in case they do not want the devicebeing attached (i.e. plugged into a usb port) automatically aftersuccessfull init().
Use cases (see next patches):...
usb core: use qdev for -usbdevice
This patchs adds infrastructure to handle -usbdevice via qdev callbacks.USBDeviceInfo gets a name field (for the -usbdevice driver name) and acallback for -usbdevice parameter parsing.
The new usbdevice_create() function walks the qdev driver list and looks...
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
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....
usb: hotplug windup
switch usb bus to inplace allocation.
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
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....
qdev/usb: make qemu aware of usb busses.
Move usb code from vl.c to usb-bus.c and make it use the new datastructures added by qdev conversion. qemu usb core should be ableto handle multiple USB busses just fine now (untested though).
Kill some usb_*_init() legacy functions, use usb_create_simple()...