[Spice-devel] problem of the USB redir on Windows

zhou link freboat at gmail.com
Sat Apr 27 21:19:20 PDT 2013


Hans de Goede  & Gerd Hoffmann:


theses  days   i  try  to migrate the usbredir  lib to  Windows

the  usbredir-0.6/usbredirserver/usbredirserver.c  connect to qemu's
redirect channel and spicec connect to the guest.

the usbredirserver  works smooth in Linux,  spicec show the usb disk works
well.


when i compile usbredir on Windows,  usbredirserver connect and open usb
device ok,

qemu's guest(windows xp) in spicec can detect the usb device,  but only
show unkown usb device,

i open the device in windows's hardware manager, and  found the pid and vid
of the device is 000.


i debug the qemu's redirect  code(hw/usb/hcd_ehci.c),  and found the diff
between  linux's and windows's  when usbredirserver connect
is here:

-----------------------------------------------------------------------------------------
static int ehci_execute(EHCIPacket *p, const char *action)
...............
   p->pid = ehci_get_pid(&p->qtd);
    p->queue->last_pid = p->pid;
    endp = get_field(p->queue->qh.epchar, QH_EPCHAR_EP);   //When windows
it always return 0

             ///while Linux it will return 0, 1 or 2
    ep = usb_ep_get(p->queue->dev, p->pid, endp);

-------------------------------------------------------------------------------------------

i found the qh.epchar read from dma,  but can not find who write it,
can you  explain it the flow of the function.
how  doest usbredirect   control the dma ?

thanks you tow  very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130428/12febdbf/attachment.html>


More information about the Spice-devel mailing list