Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor specific device class #7

Closed
cezuni opened this issue Jan 14, 2019 · 16 comments
Closed

Vendor specific device class #7

cezuni opened this issue Jan 14, 2019 · 16 comments
Labels
bug Something isn't working question Further information is requested

Comments

@cezuni
Copy link

cezuni commented Jan 14, 2019

As @wrenchonline reported (#6 (comment)), USB device with USB class 255(vendor-specific) is not working.
Can it be resolved similarly such as a device with class 0 ?

@cezuni
Copy link
Author

cezuni commented Jan 14, 2019

@wrenchonline : (1) Yeah, 255 class had not been treated.. But this case can be easily improved. (2) You mentioned IRP_MN_REMOVE_DEVICE happens. Honestly, I have no idea for that case. More thoughts needed?

@cezuni
Copy link
Author

cezuni commented Jan 15, 2019

@wrenchonline : (1) Yeah, 255 class had not been treated.. But this case can be easily improved. (2) You mentioned IRP_MN_REMOVE_DEVICE happens. Honestly, I have no idea for that case. More thoughts needed?

After more thought, IRP_MN_REMOVE_DEVICE may be issued by an upper USB class driver. This problem was addressed at #6 (comment) .

@cezuni
Copy link
Author

cezuni commented Jan 15, 2019

@wrenchonline : In my opinion, IOCTL_INTERNAL_USB_GET_TOPOLOGY_ADDRESS is not related to device removal. As noted before, I suspect that USB command timeout (500msec) makes PNP manager to issue IRP_MN_REMOVE_DEVICE. By the way, do your logs have any cancellation of an issued IRP ? The reason why i ask is that IRP cancellation is preceded before removing a device.

@cezuni
Copy link
Author

cezuni commented Jan 16, 2019

@wrenchonline : If you comment out following lines, vhci cannot handle a real faulty error.

https://github.com/cezuni/usbip-win/blob/27ec58531963eeca4d679a7ad70e705f00bdb4e4/driver/vhci/vhci_write.c#L239-L242

It seems the return STATUS_UNSUCCESSFUL;Is the upper driver issued IRP_MN_REMOVE_DEVICE key!

I finally have realized why IRP cancellation was not found when your device was removed. In your case, IRP actually failed!! Yeah, usbip-win logging is too bad to miss an important event.
I think that dropping STATUS_UNSUCCESSFUL cannot be a desirable solution. How about trying to find the reason why usbip command fails at linux box. Linux kernel logs may provide a useful information.

@cezuni
Copy link
Author

cezuni commented Jan 16, 2019

@wrenchonline : Your hub on linux doesn't seem to work correctly. "device descriptor read/64, error -110" is generated by drivers/usb/core/hub.c in linux kernel. -110 error is ETIMEDOUT.
I recommend you to check a physical or virtual hub.

@cezuni
Copy link
Author

cezuni commented Jan 16, 2019

@wrenchonline : I'm happy to see your smile. Maybe, returning STATUS_SUCCESS is more reasonable. I 'll check it out more.

@cezuni
Copy link
Author

cezuni commented Feb 8, 2019

@wrenchonline : Is your vendor specific class device working correctly if a recent vhci driver is applied ?

@Oxalin Oxalin added bug Something isn't working question Further information is requested labels Mar 9, 2019
@cezuni cezuni closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants
@Oxalin @cezuni and others