Closed florg-32 closed 5 months ago
Hello, thank you for the detailed bug report!
While looking into this, I realize that I have completely misunderstood what USBIP_CMD_UNLINK
was supposed to do, as I thought it was a request for graceful shutdown of the connection.
I'll hopefully be able to have a closer look at it in the next few days.
In the current implementation, the server removes a USB device from its
used_device
list when it receivesUSBIP_CMD_UNLINK
.This however leads to issues when multiple URBs are unlinked (wrongly triggers
usbip_ret_unlink_fail
) or when attempting to submit an URB afterwards (panics oncurrent_import_device.unwrap()
). Looking at the USB/IP protocol (3rd diagram) both things should be possible.