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

usb: Attempt detaching kernel driver #71

Conversation

quic-bjorande
Copy link
Contributor

In the event that the kernel have some other driver attached to the device the attempt claim of the interface will fail.

Lost in the libusb conversion was a call to USBDEVFS_DISCONNECT to first detach any such drivers. Reintroduce this by invoking libusb_detach_kernel_driver().

As with some other libusb functions there are multiple return values denoting "success", so rely on libusb_claim_interface() to catch the actual errors.

Reported-by: Maxim Akristiniy
Suggested-by: Maxim Akristiniy

In the event that the kernel have some other driver attached to the
device the attempt claim of the interface will fail.

Lost in the libusb conversion was a call to USBDEVFS_DISCONNECT to first
detach any such drivers. Reintroduce this by invoking
libusb_detach_kernel_driver().

As with some other libusb functions there are multiple return values
denoting "success", so rely on libusb_claim_interface() to catch the
actual errors.

Reported-by: Maxim Akristiniy
Suggested-by: Maxim Akristiniy
Signed-off-by: Bjorn Andersson <[email protected]>
@konradybcio konradybcio merged commit 1d8a3ff into linux-msm:master Jun 7, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants