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: Disconnect the virtual device only for TRANSFER_NO_DEVICE error #15574

Merged
merged 1 commit into from
May 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions rpcs3/Emu/Cell/lv2/sys_usbd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,7 @@ void usb_handler_thread::transfer_complete(struct libusb_transfer* transfer)
case LIBUSB_TRANSFER_COMPLETED: usbd_transfer->result = HC_CC_NOERR; break;
case LIBUSB_TRANSFER_TIMED_OUT: usbd_transfer->result = EHCI_CC_XACT; break;
case LIBUSB_TRANSFER_OVERFLOW: usbd_transfer->result = EHCI_CC_BABBLE; break;
case LIBUSB_TRANSFER_ERROR:
case LIBUSB_TRANSFER_CANCELLED:
case LIBUSB_TRANSFER_STALL:
case LIBUSB_TRANSFER_NO_DEVICE:
default:
usbd_transfer->result = EHCI_CC_HALTED;
if (usbd_transfer->assigned_number && handled_devices.erase(usbd_transfer->assigned_number))
{
Expand All @@ -600,6 +596,12 @@ void usb_handler_thread::transfer_complete(struct libusb_transfer* transfer)
usbd_transfer->assigned_number = 0;
}
break;
case LIBUSB_TRANSFER_ERROR:
case LIBUSB_TRANSFER_CANCELLED:
case LIBUSB_TRANSFER_STALL:
default:
usbd_transfer->result = EHCI_CC_HALTED;
break;
Florin9doi marked this conversation as resolved.
Show resolved Hide resolved
}

usbd_transfer->count = transfer->actual_length;
Expand Down