summaryrefslogtreecommitdiff
path: root/usbredirhost
AgeCommit message (Collapse)AuthorFilesLines
2011-12-21usbredirhost: Change under/overflow messages to debug messagesHans de Goede1-2/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-12-21usbredirhost: Try to keep our buffer size near the target sizeHans de Goede1-0/+28
If our buffer gets completely drained, wait for it to refill before submitting more packets. If our buffers overflows, drop not just the package causing the overflow, but drop half the buffer size packets, so that it should be at its target size of being half-filled again. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-12-21usbredirhost: properly handle clear stalls send from the usbguestHans de Goede1-0/+14
If a control packet is a clear stall, we need to do an actual clear stall, rather then just forward the control packet, so that the usbhost usbstack knows the stall is cleared. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-12-19Define exec_prefix in .pc filesChristophe Fergeau1-0/+1
@libdir@ is expanded to ${exec_prefix}/lib on my machine so we need exec_prefix to be defined in the .pc file. Thanks to Marc-André Lureau for reporting this.
2011-12-19Fix usbredirhost_cancel_iso_stream never releasing the lockHans de Goede1-1/+5
Oops. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-12-19Allow specifying locking functions for multi-threading on open / createHans de Goede2-55/+52
Having separate set_locking_funcs functions causes the locking functions to be available potentially too late. And it just is not very pretty. This commit changes the API (in a way which is backward compat with 0.3.1), so that locking functions can be specified at creation time, just like all the other callbacks. This commit also bumps the reported version to 0.3.2, so that apps using libusbredirhost can check for this version to check the presence of the new usbredirhost_open_full function. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-12-17usbredirhost: Add debug printf for control packet completionHans de Goede1-0/+3
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-11-29usbredirhost: Better locking for isochronous packet handlingHans de Goede1-48/+38
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-11-25Switch to autotools build systemChristophe Fergeau4-52/+26
Replace the current build system with an autotools based one. HdG, 3 small changes: 1) LIBUSBREDIRPARSER_SO_VERSION 1:0:0 should be 0:0:0, so that the soname does not change by going from Makefiles to autofoo 2) Drop LIBGPOD_SO_VERSION from configure.ac 3) Make libusb pkgconfig check require version >= 1.0.9 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-09-30usbredirhost: Fix copy paste error in usbredirhost_cancel_iso_streamHans de Goede1-1/+1
usbredirhost_cancel_iso_stream should call usbredirhost_cancel_iso_stream_unlocked instead of calling itself. This fixes usbredirhost_cancel_iso_stream going into an endless recursion loop. Thanks to coolper chen <lixin.chen@saicocch.com> for reporting this! Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-08-24usbredirhost: send*_inval -> send*_status cleanupHans de Goede1-25/+25
2011-08-24s/usbredirhost_send_interrupt_status/usbredirhost_send_interrupt_recv_status/Hans de Goede1-9/+11
2011-08-24usbredirhost: Add a write flush callbackHans de Goede2-0/+52
2011-08-24libusbredir*: Add (limited) multi-threading supportHans de Goede2-60/+178
2011-08-17usbredirhost: cleanup freeing of iso and interrupt packets on cancelusbredir-0.3.1Hans de Goede1-35/+13
2011-08-11usbredirhost: silence some non error errorsHans de Goede1-2/+4
2011-08-10usbredirhost: set libusb debug on openHans de Goede1-0/+2
2011-08-05libusbredirhost: Document libusbredirhost_open closing the handle on failureHans de Goede2-0/+5
Document that libusbredirhost_open closes the past in libusb device handle on failure, and make sure this is always true.
2011-08-04usbredirhost: Add usbredirhost_free_write_buffer functionHans de Goede2-1/+11
2011-08-01usbredirparser: add a usbredirparser_free_packet_data functionHans de Goede1-17/+27
Add a usbredirparser_free_packet_data function for symetry with usbredirparser_free_write_buffer.
2011-08-01usbredirhost: Add a flags parameter to usbredirhost_openHans de Goede3-4/+15
2011-07-20usbredirhost: Fix device resetsHans de Goede1-1/+1
The return statement which made this a nop was added as a quick test to work around an issue with a morphing device, it should have never ended up in git ...
2011-07-13usbredirhost_cancel_iso_stream: Fix use after freeHans de Goede1-1/+2
2011-07-13usbredirhost: Wait for cancelled packets to complete on device closeHans de Goede2-15/+34
This: -fixes a memleak where we would not free the transfer + transfer buffer for iso / int transfers -stops libusb from complaining there are still transfers pending on device close
2011-07-13Add device / interface class infoHans de Goede1-0/+23
And add a new usb_redir_interface_info packet type which contains the interface info.
2011-06-29Rename device_info -> device_connect, device_disconnected -> device_disconnectHans de Goede1-8/+12
And document how a single usbredirproto connection may be reused for a newly plugged in / re-plugged device.
2011-06-28s/usbredirparser_debug2/usbredirparser_debug_data/Hans de Goede1-2/+2
2011-06-28Fixup mistake in ab55621d commitHans de Goede1-2/+2
2011-06-28Remove id argument from usb_reset functionHans de Goede1-1/+1
Now that there no longer is a usb_reset_status packet type / callback having an id argument makes no sense.
2011-06-09Drop the usb_redir_reset_status packet typeHans de Goede1-8/+5
Drop usb_redir_reset_status, instead if reconnecting to the device fails after reset the usb-host will send a usb_redir_device_disconnected packet
2011-06-09Drop usb_redir_disconnected statusHans de Goede1-16/+13
Drop usb_redir_disconnected status, instead the usb-host should always send a usb_redir_device_disconnected packet on device disconnection. The reason behind this is that having to handle disconnection from data packet handlers make things unnecessarily hard for the usb-guest
2011-06-08usbredirhost: use pkg-config for libusb link argumentsHans de Goede1-1/+1
2011-06-08usbredirhost: better disconnect handlingHans de Goede1-2/+75
2011-06-08usbredirhost silence cancel errors everywhereHans de Goede1-11/+17
2011-06-08Silence cancel urb errors during iso stream cancelHans de Goede2-2/+13
When cancelling an active iso stream some iso packets will likely complete while we are cancelling, but we will see them as uncomplete as long as we've not asked libusb to check for complete transfers, this is inherently racy and there is nothing we can do. Thus we will sometimes try to cancel already completed transfers which will fail. This is not a problem, but libusb spews ugly error messages to stderr when this happens. This patch silences these error messages.
2011-06-08usbredirhost: fix data logging verbose level checkHans de Goede1-1/+1
2011-05-31usbredirhost: handle libusb passing -EXDEV to usHans de Goede1-0/+2
2011-05-31usbredirhost: proper max packetsize calculation for usb 2 devsHans de Goede1-2/+17
2011-05-06Replace compile.sh with a proper buildsysHans de Goede1-0/+50
2011-05-06Put source files into subdirsHans de Goede2-0/+1753