Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
So applications can test against which version they are building.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=67804
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Liang Guo <guoliang@debian.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
And populate it with 1210:001c
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
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>
|