<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:14px">Hans de Goede  & Gerd Hoffmann:</span><div style="font-family:arial,sans-serif;font-size:14px"><br><div><br></div><div>theses  days   i  try  to migrate the usbredir  lib to  Windows</div>
<div><br></div><div>the  usbredir-0.6/usbredirserver/usbredirserver.c  connect to qemu's redirect channel and spicec connect to the guest.</div><div><br></div><div>the usbredirserver  works smooth in Linux,  spicec show the usb disk works well.</div>
<div><br></div><div><br></div><div>when i compile usbredir on Windows,  usbredirserver connect and open usb device ok,</div><div><br></div><div>qemu's guest(windows xp) in spicec can detect the usb device,  but only show unkown usb device,</div>
<div><br></div><div>i open the device in windows's hardware manager, and  found the pid and vid of the device is 000.</div><div><br></div><div><br></div><div>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 </div>
<div>is here:</div><div><br></div><div>-----------------------------------------------------------------------------------------</div><div>static int ehci_execute(EHCIPacket *p, const char *action)  </div><div>...............</div>
<div><div>   p->pid = ehci_get_pid(&p->qtd);</div><div>    p->queue->last_pid = p->pid;</div><div>    endp = get_field(p->queue->qh.epchar, QH_EPCHAR_EP);   //When windows it always return 0</div>
<div>                                                                                         ///while Linux it will return 0, 1 or 2</div><div>    ep = usb_ep_get(p->queue->dev, p->pid, endp);</div><div><br></div>
<div>-------------------------------------------------------------------------------------------</div><div><br></div><div>i found the qh.epchar read from dma,  but can not find who write it,  </div><div>can you  explain it the flow of the function.</div>
<div>how  doest usbredirect   control the dma ?</div><div><br></div><div>thanks you tow  very much.</div></div></div></div>