: Move usb-redir over to using more usb-core infra + misc ehci fixes
Hi Gerd,
I've made a tree with my current usb-redir work for upstream here:
including some more ehci fixes is here, can you please add the patches from there to your usb-next tree?
The following changes since commit 7bfc5ef800fe9f578892d6ea5038796d32aba17d:
xhci: pick target interrupter (2012-08-31 15:48:00 +0200)
are available in the git repository at:
git://people.freedesktop.org/~jwrdegoede/qemu usb-for-gerd
for you to fetch changes up to bc6196953acd3b6e0d56f9d274f47421dce75d2b:
usb-redir: Enable pipelining for bulk endpoints (2012-09-03 15:40:59 +0200)
----------------------------------------------------------------
Hans de Goede (18):
ehci: Add some additional ehci_trace_guest_bug() calls
usb-core: Don't set packet state to complete on a nak
ehci: Fix memory leak in handling of NAK-ed packets
ehci: Handle USB_RET_PROCERR in ehci_fill_queue
ehci: Correct a comment in fetchqtd packet processing
usb-redir: Don't delay handling of open events to a bottom half
usb-redir: Get rid of async-struct get member
usb-redir: Get rid of local shadow copy of packet headers
usb-redir: Get rid of unused async-struct dev member
usb-core: Add a usb_ep_find_packet_by_id() helper function
usb-redir: Move to core packet id and queue handling
usb-redir: Return babble when getting more bulk data then requested
usb-redir: Convert to new libusbredirparser 0.5 API
usb-redir: Set ep max_packet_size if available
usb-redir: Add a usbredir_reject_device helper function
usb-redir: Ensure our peer has the necessary caps when redirecting to XHCI
usb-core: Allow the first packet of a pipelined ep to complete immediately
usb-redir: Enable pipelining for bulk endpoints
configure | 2 +- hw/usb.h | 2 + hw/usb/core.c | 22 ++- hw/usb/hcd-ehci.c | 71 ++++++--- hw/usb/redirect.c | 468 ++++++++++++++++++++++++------------------------------ 5 files changed, 282 insertions(+), 283 deletions(-)
Thanks & Regards,
Hans
Hi,
Quoted 3 lines
I've made a tree with my current usb-redir work for upstream here:
including some more ehci fixes is here, can you please add the patches from there to your usb-next tree?
In general it is better to work against master not usb-next as usb-next is a moving target. A little hard in this case as there is a noticable usb queue waiting for 1.3 development open and you have dependencies on patches queued up ...
Quoted 1 line
usb-redir: Convert to new libusbredirparser 0.5 API
This one adds a hard dependency on the latest libusbredirparser. Can we make this optional without too much fuss, so qemu continues to build with older versions, at least for a while? For example disable live migration support if we find an older libusbredir version?
cheers,
Gerd
Hi,
Quoted 11 lines · Gerd Hoffmann
Hi,Quoted 3 lines
I've made a tree with my current usb-redir work for upstream here:
including some more ehci fixes is here, can you please add the patches from there to your usb-next tree?In general it is better to work against master not usb-next as usb-next is a moving target. A little hard in this case as there is a noticable usb queue waiting for 1.3 development open and you have dependencies on patches queued up ...
Understood, I'll start basing my work on master again once the necessary deps for my work are in master.
Quoted 7 lines
Quoted 2 lines
usb-redir: Convert to new libusbredirparser 0.5 API
This one adds a hard dependency on the latest libusbredirparser. Can we make this optional without too much fuss, so qemu continues to build with older versions, at least for a while? For example disable live migration support if we find an older libusbredir version?
I very carefully designed the libusbredirparser API and ABI so that extensions could be added without breaking API or ABI, but the problem is the new 64 bit ids, all callbacks for received packets, and all helpers for sending packets take the id as a function argument which is now changing from an uint32_t to an uint64_t, which means break API and ABI :|
Note that at the wire level the capability negotiation makes things still work with clients which only do 32 bit ids (which are fine as long as XHCI is not involved), and like wise 64 bit id capable clients will work fine with older qemu-s.
Fulfilling your request would mean wrapping 90% of all function prototypes in hw/usb/redirect.c with #ifdef magic. Which I find rather ugly. If you prefer the ifdef's over the hard version requirement, I can do the ifdef-s, but my preference is to just put the hard version dependency on the latest usbredir in there.
Regards,
Hans
Gerd Hoffmann
AppliedHi,
Quoted 5 lines
Fulfilling your request would mean wrapping 90% of all function prototypes in
hw/usb/redirect.cwith #ifdef magic. Which I find rather ugly. If you prefer the ifdef's over the hard version requirement, I can do the ifdef-s, but my preference is to just put the hard version dependency on the latest usbredir in there.
Ok, too much trouble, lets skip it then. We'll do it just after the 1.2 release so there is time for people to adapt before 1.3 gets released.
Applied patches, fixed up codestyle, reordered to group patches, pushed to usb-next.
cheers,
Gerd