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

Some USB storage devices cannot be attached to VM because of VHCI controller does not support streams. #7118

Closed
jevank opened this issue Dec 13, 2021 · 1 comment
Labels
C: storage diagnosed Technical diagnosis has been performed (see issue comments). hardware support P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@jevank
Copy link

jevank commented Dec 13, 2021

How to file a helpful issue

Qubes OS release

R4.1 (I guess 4.0 too)

Brief summary

UAS driver in VM tries to init device with streams support but fails with such messages:

[  +0.029211] usb 2-1: USB controller vhci_hcd.0 does not support streams, which are required by the UAS driver.
[  +0.000029] usb 2-1: Please try an other USB controller if you wish to use UAS. 

It could be fixed with disabling UAS kernel support and using usb-storage driver instead which leads to performance regression (about 10% as I understand). With linux VM could be used block attaching, but with Windows VMs it is not stable enough.

It might be enough to disable UAS in stubdomain kernel.

Steps to reproduce

Attach via qvm-usb USB storage HDD device with USB streams support (usual large than 2Tb)

Expected behavior

Storage available in VM.

Actual behavior

Attaching fails.

@jevank jevank added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Dec 13, 2021
@jevank jevank changed the title Some USB storage devices cannot be attached to VM because of VHCI controller do not support streams. Some USB storage devices cannot be attached to VM because of VHCI controller does not support streams. Dec 13, 2021
@andrewdavidwong andrewdavidwong added C: storage hardware support needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Dec 14, 2021
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Dec 14, 2021
@jevank
Copy link
Author

jevank commented Dec 14, 2021

Disabling UAS kernel support partially fixes the problem for linux VMs, but using qubes kernel I observe reset device issue - some devices freeze after apply usb_clear_halt and client lost connection (with 5.4 kernel) or requires long time to init device (I see with 5.10). We fix it with this patch, but I unfortunately I had no time to widely describe it to propose to upstream. We use it more than a year and have no issues with it so I think it is pretty useful.

Stubdomains kernel doesn't contain USB device drivers excluding USBIP and doesn't init USB devices. So fixing the reset device issue might be enough.

jevank added a commit to jevank/qubes-linux-kernel that referenced this issue Dec 14, 2021

Verified

This commit was signed with the committer’s verified signature.
jevank Ivan Kardykov
Some USB 3.0+ storage devices freeze with usb_clear_halt(), but it is
enough to reset endpoint.

This fixes QubesOS/qubes-issues#7118 and could be useful with other
devices.
jevank added a commit to jevank/qubes-linux-kernel that referenced this issue Dec 14, 2021

Verified

This commit was signed with the committer’s verified signature.
jevank Ivan Kardykov
This requires to fix QubesOS/qubes-issues#7118
@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: storage diagnosed Technical diagnosis has been performed (see issue comments). hardware support P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants