History | View | Annotate | Download (45 kB)
unbreak usb pass-through on linux.
Changes: * Re-add the 'dev->fd = fd;' line which the qdev patches dropped by mistake. * call qdev_init() so the newly created usb device is plugged into a usb port and thus actually visible to the guest.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
Use proper format conversion specifier when printing size_t value
And untabify this while we are at it.
Signed-off-by: malc <av1474@comtv.ru>
usb-linux.c: fix buffer overflow
In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer andlength to the kernel. However, the length was provided by the callerof dev->handle_packet, and is not checked, so the kernel might providetoo much data and overflow our buffer....
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()...
USB: use opaque parameter passing for monitor handle
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix Sparse warnings: "Using plain integer as NULL pointer"
Prefer sysfs for USB host devices
Scanning for devices via /sys/bus/usb/devices/ and using them via the/dev/bus/usb/<bus>/<device> character devices is the prefered methodon modern kernels, so try that first.
When using SELinux and libvirt, qemu will have access to /sys/bus/usb...
USB serial device support
Add in a workaround to allow the usb serial devices to work with theusb pass through mechanism. The ioctl() to request an alternateinterface will always return < 0 for a usb-serial device based on thekernel driver. This means there is no alternate interface end point....
monitor: Rework API (Jan Kiszka)
Refactor the monitor API and prepare it for decoupled terminals:term_print functions are renamed to monitor_* and all monitor servicesgain a new parameter (mon) that will once refer to the monitor instancethe output is supposed to appear on. However, the argument remains...
toplevel: 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@6531 c046a42c-6fe2-441c-8c8c-71466251a162
Suppress a -Werror=format-security warning
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6135 c046a42c-6fe2-441c-8c8c-71466251a162
Native BSD host USB support (Juergen Lock, Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5780 c046a42c-6fe2-441c-8c8c-71466251a162
Use qemu_isfoobar and qemu_towombat versions, based on patch by Christoph Egger
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5774 c046a42c-6fe2-441c-8c8c-71466251a162
Use locally defined structure.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5569 c046a42c-6fe2-441c-8c8c-71466251a162
Silence warnings about unused variables
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5535 c046a42c-6fe2-441c-8c8c-71466251a162
Keep usb host scanning from leaking file descriptors
If the first case does not succeed, then the usb scanning code will leak filedescriptors on every scan.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5509 c046a42c-6fe2-441c-8c8c-71466251a162
Fix broken USB support for Linux host (Bjorn Danielsson)
Make "host:" usb devices work again on systems that have thefile /proc/bus/usb/devices. This was broken in r5441 due toincorrect logic for the USB_FS_SYS case in usb_host_scan().
Signed-off-by: Bjorn Danielsson <bdq@dax.nu>...
Add USB sys file-system support (v8) (TJ)
This patch adds support for host USB devices discovered via:
/sys/bus/usb/devices/* and opened from /dev/bus/usb/*/*/dev/bus/usb/devices and opened from /dev/bus/usb/*/*
in addition to the existing discovery via:...
Don't use sprintf() or strcpy()
They are unsafe. The current code is correct, but to be safer, we should passan explicit size.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5290 c046a42c-6fe2-441c-8c8c-71466251a162
Define a few structures instead of including a file, add "static"
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5225 c046a42c-6fe2-441c-8c8c-71466251a162
usb: Support for removing device by host addr, improved auto filter syntax (Max Krasnyansky)
This patch adds support for removing USB devices by host address.Which is usefull for things like libvirtd because there is no easy way tofind guest USB address of the host device....
husb: Make control transactions asynchronous (Max Krasnyansky)
USB is 99.8% async now :). 0.2% is the three control requests thatwe need to execute synchronously. We could off-load that to a threador something but it's not worth the pain since those requests are...
husb: Fixup printfs and stuff based on the review comments (Max Krasnyansky)
Addressing Anthony's comments regarding printf and stuff.
Anthony, if you you want I can fold this commit and resendthe original patch.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>...
husb: remove disconnect detection timer (Max Krasnyansky)
On top of my previous USB patchset.
Async completion handler can detect device disconnects without polling.We do not need the timer anymore.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
husb: rewrite Linux host USB layer, fully async operation (Max Krasnyansky)
This is a follow up to the async UHCI patch. Both BULK and ISOC transactionsare now fully asynchrounous. I left CONTROL synchronous for now, ideallywe want it to be async too and it should not be that hard to do now....
husb: support for USB host device auto connect (Max Krasnyansky)
QEMU can now automatically grab host USB devices that match the filter.For now I just extended 'host:X.Y' and 'host:VID:PID' syntax to handlewildcards. So for example if you do something like...
husb: support for USB host device auto disconnect (Max Krasnyansky)
I got really annoyed by the fact that you have to manually dousb_del in the monitor when host device is unplugged and decidedto fix it :)
Basically we now automatically remove guest USB device...
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
Use a O_NONBLOCK pipe for iso completion signals for thread-safety, by Arnon Gilboa.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3492 c046a42c-6fe2-441c-8c8c-71466251a162
Quiet warnings introduced with the USB iso support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3329 c046a42c-6fe2-441c-8c8c-71466251a162
USB iso transfers support for the linux redirector and for UHCI, by Arnon Gilboa.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3328 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Build fix for newer kernel headers, thanks Jason Wessel.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2236 c046a42c-6fe2-441c-8c8c-71466251a162
SCSI and USB async IO support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162
usb destroy API change (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2066 c046a42c-6fe2-441c-8c8c-71466251a162
Linux compilation fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2065 c046a42c-6fe2-441c-8c8c-71466251a162
display device identifier string for user with info usb (Lonnie Mendez)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2029 c046a42c-6fe2-441c-8c8c-71466251a162
Rearrange SCSI disk emulation code.Add USB mass storage device emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1940 c046a42c-6fe2-441c-8c8c-71466251a162
Tweak UHCI device settings. Ignore host root hubs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1779 c046a42c-6fe2-441c-8c8c-71466251a162
correct use of USBDEVFS_DISCONNECT
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1621 c046a42c-6fe2-441c-8c8c-71466251a162
USB user interface
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1603 c046a42c-6fe2-441c-8c8c-71466251a162
initial USB support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1597 c046a42c-6fe2-441c-8c8c-71466251a162