Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix fetch data after low level bus error reap completed#1557

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
maybetaken wants to merge1 commit intolibusb:master
base:master
Choose a base branch
Loading
frommaybetaken:handle_low_level_completed_error
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix fetch data after low level bus error reap completed
Low level bus error reap completed is treated as LIBUSB_TRANSFER_ERRORThen it continues to fetch data, in some cases usb device is plugged outthen ioctl will hang servel ms for waiting device data. This committreats low level error and transfer completed as not required foranother reap thusing fixing waiting ioctl return.
  • Loading branch information
@maybetaken
maybetaken committedAug 29, 2024
commit29ba868f0ad6bd06c890eda95b92886c7504e749
8 changes: 6 additions & 2 deletionslibusb/os/linux_usbfs.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2466,6 +2466,7 @@ static int handle_bulk_completion(struct usbi_transfer *itransfer,
}

cancel_remaining:
int prev_reap_status = tpriv->reap_status;
if (tpriv->reap_action == ERROR && tpriv->reap_status == LIBUSB_TRANSFER_COMPLETED)
tpriv->reap_status = LIBUSB_TRANSFER_ERROR;

Expand All@@ -2484,9 +2485,12 @@ static int handle_bulk_completion(struct usbi_transfer *itransfer,
free(tpriv->urbs);
tpriv->urbs = NULL;
usbi_mutex_unlock(&itransfer->lock);
return tpriv->reap_action == CANCELLED ?
usbi_handle_transfer_cancellation(itransfer) :

int r = tpriv->reap_action == CANCELLED ?usbi_handle_transfer_cancellation(itransfer) :
usbi_handle_transfer_completion(itransfer, tpriv->reap_status);

return tpriv->reap_action == ERROR && prev_reap_status == LIBUSB_TRANSFER_COMPLETED ?
1 : r;
}

static int handle_iso_completion(struct usbi_transfer *itransfer,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp