summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-21Prepare for 0.7 releaseHEADusbredir-0.7masterHans de Goede1-1/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-05-19Update ChangeLog and usb-redirection-protocol.txtHans de Goede2-5/+8
Landing the necessary kernel and libusbn changes for bulk stream support has taken a while, so update the dates. Also add a few missing changes to the ChangeLog. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: reset device on releaseHans de Goede1-0/+10
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: lock host earlier in async packet completion callbacksHans de Goede1-5/+6
The transfer->foo_packet union members are also used on cancellation, and completion and cancellation may race, so they should not be accessed without holding the lock. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: Improve debug loggingHans de Goede1-9/+22
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: Fix a cancellation corner caseHans de Goede1-1/+3
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: Add missing flush on cancelHans de Goede1-0/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: Ensure all in flight urbs are cancelled before a resetHans de Goede1-0/+11
The guest should have cancelled any pending urbs already, but the cancellations have not necessary completed when we receive a reset. If we then continue with the reset pending urbs may complete with an error code of LIBUSB_TRANSFER_NO_DEVICE, causing us to see a device disconnect. We also need to cleanly shutdown any streams and let the guest know they should be restarted after the reset. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost_cancel_pending_urbs: Add a notify_guest parameterHans de Goede1-4/+11
If this is 1 then the guest will be send stream_status packets with a status of usb_redir_stall for any stopped streams. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: Add usbredirhost_wait_for_cancel_completion helperHans de Goede1-12/+19
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirproto.h: Add a USBREDIR_VERSION defineHans de Goede2-0/+4
So applications can test against which version they are building. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-11-19usbredirhost: Implement support for bulk streamsHans de Goede2-5/+86
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-10-19usbredirhost: Fill in max_streams in ep_infoHans de Goede1-0/+24
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-10-19usb-redir-proto: Allow bulk_stream alloc/free on multiple endpointsHans de Goede3-16/+31
Change bulk_stream packet definitions to allow allocating / freeing streams on multiple endpoints in one go, technically this is a protocol change, but no-one has implemented usb_redir_cap_bulk_streams so far, so we can safely do this Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-10-19usb-redir-proto: Extend usb_redir_ep_info_header with a max_streams fieldHans de Goede5-5/+52
The usb_redir_ep_info_header has been extended with a max_streams field, this is only send / received if both sides have usb_redir_cap_bulk_streams Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-10-19usbredirparser: Add a usbredirparser_caps_get_cap helper functionHans de Goede1-14/+18
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-10-19ChangeLog: Update with recent changesHans de Goede1-0/+11
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-09-20Update TODOHans de Goede1-0/+3
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-09-05usbredirparser: Update header-len inside the usbredirparser_do_read loopHans de Goede1-0/+2
If we process the hello packet with the 64 bit id capability bit in the same loop as other packets (because they were send quickly after one each other), then we end up reading 48 bytes for the header of the next packets processed in the same loop, while we should read 64 bytes for them, causing the sender and receiver to get out of sync. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-09-05usbredirparser: Improve error logging for invalid packet lengthsHans de Goede1-1/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-08-06usbredirparser: Fix usbredirparser_do_write return value in case of blockingHans de Goede1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=67804 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-08-02make usbredirserver whatis entry meaningfulLiang Guo1-2/+2
Signed-off-by: Liang Guo <guoliang@debian.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-07-12usbredirhost: Use libusb_set_auto_detach_kernel_driver when availableHans de Goede1-0/+15
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-13usbredirhost: Fix coverity sign_extension warningHans de Goede1-1/+2
Coverity does not like uint8_t * int being casted to an uint64_t, change the int to an unsigned int to make it happy. Note that the int in question can never be > 255, so this is not a real issue. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-13usbredirserver/testclient: Error check fcntl callsHans de Goede2-5/+23
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-07usbredirserver: Allow connections from both ipv6 and ipv4Hans de Goede1-25/+17
The while loop over the getaddrinfo result would bind to the ipv4 addr and then stop, causing usbredirserver to not accept connections on ipv6. Instead bind explicitly to ipv6 with in6addr_any, which accepts connections from both. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-05-03usbredirfilter.h: Correct usbredirfilter_check comment wrt ENOENT returnHans de Goede1-2/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-01-25Don't export glibc_ symbolsMarc-André Lureau1-1/+2
2013-01-25Properly declare C symbolsMarc-André Lureau4-0/+34
2012-12-13Prepare for a 0.6 releaseusbredir-0.6Hans de Goede2-3/+6
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add a do-not-reset device blacklistbuffered-bulk-wipHans de Goede2-11/+48
And populate it with 1210:001c Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Only apply mult to max-packet-size for isoc high speed endpointsHans de Goede2-16/+18
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add support for buffered bulk inputHans de Goede3-10/+70
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add usbredirhost_stop_stream() helper functionHans de Goede1-28/+14
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add usbredirhost_send_stream_data() helper functionHans de Goede1-34/+49
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Push sending of stream error status lower down the stackHans de Goede1-59/+43
Send the error status in the places where the error actually happens, rather then passing an error return code all the way up, and then check + send the error status at the higher level. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add usbredirhost_send_stream_status() helper functionHans de Goede1-32/+36
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add usbredirhost_clear_stream_stall_unlocked() helper funcHans de Goede1-29/+22
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost_interrupt_packet_complete: Split into in / out versionsHans de Goede1-26/+37
And name the input version usbredirhost_buffered_packet_complete in preparation for also using it for handling of buffered bulk-in endpoints. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Use multiple transfers for interrupt receivingHans de Goede2-136/+35
To ensure we don't loose any date when we suffer some latency in completion processing. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost_submit_stream_transfer_unlocked: Handle device disconnectHans de Goede1-3/+7
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Misc. stream cleanupsHans de Goede1-25/+28
1) Any stream failure which causes the stream to stop, should return usb_redir_stall, push this logic into the actual functions causing the failure, rather then letting the callers translate the error code. 2) Rename usbredirhost_alloc_stream to usbredirhost_alloc_stream_unlocked, add a new usbredirhost_alloc_stream() which does the locking on behalf of the caller. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Move start_stream for input endpoints to alloc_streamHans de Goede1-17/+7
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Add usbredirhost_start_stream_unlocked() helper functionHans de Goede1-34/+33
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Move the stream utility functions togetherHans de Goede1-127/+131
Now that the iso functions have been changed into generic buffered stream functions group them together in their own block, rather then grouping them with other iso functions. No functional changes, just moving code around. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirhost: Change iso code into generic buffered stream codeHans de Goede1-121/+127
Mostly just variable/function renaming, and some small changes to usbredir_alloc_iso_stream to allow extending it to also allocate other type of streams (interrupt, bulk). This is a preparation patch for using multiple transfers per endpoint for interrupt receiving as well as for adding buffered bulk input support. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-05usbredirparser: Verify that interrupt / bulk recv gets an input epHans de Goede1-8/+81
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-11-27usbredirparser: Add support for buffered bulk inputHans de Goede4-2/+144
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-11-27usbredirproto: Add support for buffered bulk inputHans de Goede3-3/+171
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-11-27usbredirparser: Add an upper limit to bulk transfer lengthsHans de Goede1-2/+10
Now that the length field has been extended to 32 bits we could get very long bulk transfers. This patch adds an upper limit sanity check to the bulk transfer length. Signed-off-by: Hans de Goede <hdegoede@redhat.com>