Hi Junjie

> Subject: Re: [PATCH v7 6/8] hw/usb/redirect-server: Implement bulk and
> interrupt transfers
> 
> Hi Jamin,
> 
> On Wed, Oct 28, 2026 at 03:41:48AM +0000, Jamin Lin wrote:
> > +    int actual = rp->pkt.actual_length;
> > +    /* Only an IN transfer carries data back. */
> > +    int len = is_in ? actual : 0;
> 
> For OUT this also zeroes the length in the reply header, and redirect.c copies
> that length into p->actual_length.
> 
> With usb-storage exported and qemu-xhci on the client side, the device
> enumerates, but the Debian guest keeps resetting it and no sda shows up. A
> usb-ehci client works, because EHCI ignores the OUT length.
> 
> Keeping actual in the header and sending no payload for OUT, as usbredirhost
> does, fixes it here: sda appears on xHCI and a 1 MiB write/read compares
> equal. The control and interrupt OUT replies drop the length the same way.
> 
> The endpoint checks from v6 work now, including start_interrupt_receiving on
> a bulk endpoint, thanks.
> 
> Junjie

Thanks for the review and suggestion.

I only tested with EHCI on AST2700, so I did not notice this issue.
After testing with xHCI on the Q35 machine, I was able to reproduce this issue.
The usb-storage SCSI probe failed and no /dev/sdX device appear in the guest
I will fix it.

Thanks,
Jamin

Reply via email to