mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
USB: Disconnect the virtual device only for TRANSFER_NO_DEVICE error
Resolve: #15565
This commit is contained in:
parent
c02aae417a
commit
7ac097255e
@ -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))
|
||||
{
|
||||
@ -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;
|
||||
}
|
||||
|
||||
usbd_transfer->count = transfer->actual_length;
|
||||
|
Loading…
Reference in New Issue
Block a user