All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junjie Cao <junjie.cao@linux.dev>
To: jamin_lin@aspeedtech.com, kraxel@redhat.com, marcandre.lureau@redhat.com
Cc: clg@kaod.org, peter.maydell@linaro.org, kane_chen@aspeedtech.com,
	troy_lee@aspeedtech.com, qemu-arm@nongnu.org,
	qemu-devel@nongnu.org, junjie.cao@intel.com,
	junjie.cao@linux.dev
Subject: Re: [PATCH v7 6/8] hw/usb/redirect-server: Implement bulk and interrupt transfers
Date: Thu, 29 Oct 2026 05:09:42 -0500	[thread overview]
Message-ID: <20261029100942.894066-3-junjie.cao@linux.dev> (raw)
In-Reply-To: <20261028034140.367393-7-jamin_lin@aspeedtech.com>

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


  reply	other threads:[~2026-10-29 10:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  3:41 [PATCH v7 0/8] hw/usb: Add a usbredir server transport Jamin Lin
2026-10-28  3:41 ` [PATCH v7 1/8] hw/usb/bus: Let the controller ask for the automatic hub Jamin Lin
2026-10-29 10:09   ` Junjie Cao
2026-10-29 11:33     ` Gerd Hoffmann
2026-10-29 14:49       ` Junjie Cao
2026-10-29 17:44   ` marcandre.lureau
2026-10-28  3:41 ` [PATCH v7 2/8] hw/usb/redirect-server: Add a usbredir server device Jamin Lin
2026-10-28  3:41 ` [PATCH v7 3/8] hw/usb/redirect-server: Connect usbredirparser to a chardev Jamin Lin
2026-10-28  3:41 ` [PATCH v7 4/8] hw/usb/redirect-server: Announce the exported device Jamin Lin
2026-10-29 10:09   ` Junjie Cao
2026-10-29 17:44   ` marcandre.lureau
2026-10-28  3:41 ` [PATCH v7 5/8] hw/usb/redirect-server: Implement control transfers Jamin Lin
2026-10-29 17:44   ` marcandre.lureau
2026-10-28  3:41 ` [PATCH v7 6/8] hw/usb/redirect-server: Implement bulk and interrupt transfers Jamin Lin
2026-10-29 10:09   ` Junjie Cao [this message]
2026-10-28  3:41 ` [PATCH v7 7/8] hw/usb/redirect-server: Stream interrupt IN endpoints Jamin Lin
2026-10-29 17:44   ` marcandre.lureau
2026-10-28  3:41 ` [PATCH v7 8/8] hw/arm/aspeed: Enable the usbredir server transport Jamin Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261029100942.894066-3-junjie.cao@linux.dev \
    --to=junjie.cao@linux.dev \
    --cc=clg@kaod.org \
    --cc=jamin_lin@aspeedtech.com \
    --cc=junjie.cao@intel.com \
    --cc=kane_chen@aspeedtech.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=troy_lee@aspeedtech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.