Coder Social home page Coder Social logo

Comments (8)

chenfy1985 avatar chenfy1985 commented on July 4, 2024 1

1.returning UNSUCCESSFUL is correct and must set urb->UrbHeader.Status = USBD_STATUS_STALL_PID,
then vhci driver can receive the request of URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL
2. and vhci do not handle URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL , so just forward it
3. and stub need to call reset_pipe

I'll upload diffs later


@cezuni I created a fork of your proj, and pushed a [commit] (chenfy1985@afaa89a)

from usbip-win.

Oxalin avatar Oxalin commented on July 4, 2024

@chenfy1985 Would you be able to give us a more complete log?

from usbip-win.

chenfy1985 avatar chenfy1985 commented on July 4, 2024

I have the same problem as #7 (comment),
I tried to modify the code , but the device is still not working.

from usbip-win.

chenfy1985 avatar chenfy1985 commented on July 4, 2024

Reason:

  1. the stub driver detect a err code of STALL_PID
  2. vhci_write.c:process_urb_res_submit catch the error and return STATUS_UNSUCCESSFUL
  3. then the vhci driver will receive IRP_MN_REMOVE_DEVICE

My solution:

  1. vhci_write.c:process_urb_res_submit , return the STALL_PID to urb->UrbHeader.Status
  2. then the vhci driver will receive URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL
  3. forward it to usb server side

now it seems working well, but bsod occurred at usb server side

from usbip-win.

cezuni avatar cezuni commented on July 4, 2024

@chenfy1985 : Current vhci will act as you describe in reason paragraph.
As previously noted( #7 (comment) ), I am not sure that returning UNSUCCESSFUL is correct. Can you share your diff ?

from usbip-win.

cezuni avatar cezuni commented on July 4, 2024

@chenfy1985 : Sorry for too late. I rebased your awesome work and merged into fix_stall_multi_conf branch. I slightly modified your code for beautifying. I've checked with my three USB devices. You had also fixed the transient code to always set to 1 when selecting configuration. Maybe af07a34 solves multi configuration device problem such as #25, #30. Anyway, thanks!

from usbip-win.

cezuni avatar cezuni commented on July 4, 2024

@chenfy1985 : your work has been merged into master branch. check 781e315 fix_stall_multi_conf branch is removed.

from usbip-win.

cezuni avatar cezuni commented on July 4, 2024

@wrenchonline : Good to see you~

It seems that the device changed a PID during the second startup.

Why don't you create a new issue? If the such kind of a problem exists, it does not seem to be related to this issue.

from usbip-win.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.