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

Addresses issue #408 for macOS. Under macOS, when libusb_cancel_transfer #924

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jcmartin
Copy link

@jcmartin jcmartin commented May 18, 2023

Addresses issue #408 for macOS. Under macOS, when libusb_cancel_transfer is called on one transfer, all transfers on the same endpoint are cancelled. Calling libusb_cancel_transfer on additional transfers on the same endpoint may result in macOS returning kIOReturnAborted. The net result is the bladeRF can no longer be communicated with.

The fix to this is to only call libusb_cancel_transfer once in cancel_all_transfers and set the appropriate state for all transfers. Refer to libusb_cancel_transfer documentation for more details.

https://libusb.sourceforge.io/api-1.0/group__libusb__asyncio.html#ga685eb7731f9a0593f75beb99727bbe54

Using the script from issue #408, I am unable to cause the error anymore.

…transfer

is called on one transfer, all transfers on the same endpoint are
cancelled. Calling libusb_cancel_transfer on additional transfers on the
same endpoint _may_ result in macOS returning kIOReturnAborted. The net
result is the bladeRF can no longer be communicated with.

The fix to this is to only call libusb_cancel_transfer once in
cancel_all_transfers and set the appropriate state for all transfers.
Refer to libusb_cancel_transfer documentation for more details.
@CLAassistant
Copy link

CLAassistant commented Oct 20, 2024

CLA assistant check
All committers have signed the CLA.

@jcmartin
Copy link
Author

This pull request has been here for over a year now. Any chances of this getting merged? @rghilduta

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