Hi Jamin,

On Mon, Nov 02, 2026 at 09:22:23AM +0000, Jamin Lin wrote:
> +    if (!s->host_connected || !device || !device->attached) {
> +        return usb_redir_ioerror;
> +    }

The device stays in USB_STATE_ATTACHED until the announce BH resets it,
so a control_packet in the same read as hello passes this check and
hits the USB_STATE_DEFAULT assert in usb_handle_packet(). Checking
device_announced here would cover it.

For whenever you respin: stop_transfers() on a reset drops packets the
client may still cancel; usbredirhost answers them first.

Tested: usb-storage exported from ast2600-evb enumerates behind
qemu-xhci and usb-ehci, usb-audio behind qemu-xhci, and each
SET_INTERFACE alt 1 is followed by an ep_info with the iso OUT endpoint.

Junjie

Reply via email to