[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v8 14/18] hw/usb/redirect-server: Implement control transfers
- To: Junjie Cao <junjie.cao@xxxxxxxxx>
- From: Jamin Lin <jamin_lin@xxxxxxxxxxxxxx>
- Date: Mon, 9 Nov 2026 02:57:11 +0000
- Accept-language: zh-TW, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=aspeedtech.com; dmarc=pass action=none header.from=aspeedtech.com; dkim=pass header.d=aspeedtech.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F9nXBS8S94qf4A24kGLZUf4xuXXgQzpnvIVcGjGPAhI=; b=mfgfBWJhaWcyuE5o+dVQ7McHxzvCK8IH156v8Ul97AajqmvWxlperMRp4Jk8s6gC7IfCXH8YiXGSaFnybxo8jnq8sOL7gi8icDxdJ+sMgK6NujmKcBltz/QyDK/2kmhYfw/TP974c5cxBMUqf9NDZnegMx2gqeDI02ZpdSMbP8X3aan6SiTaFyFnI/teP9/0ffnqS28H0koYHVI23zToL2OLOAuSHl57jktn51qcp31z3OHQKH/fkcQsfGXGRwg0T5FrF33mDy2gUfy4Nl0iTKX6pE0+fAwa7ikgr4fdbJAV73Qx2VnXrz87WXJqsVARXl55+JHLyHIDp9yWy22qbA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VPuX7SRLOJ3uZhKRtcG7xvY9UdqigmXCcqj/AE7HJ3KFWhWU20QpMmNvgY3hRv5PvixCVx7AWaXfXSFliFahM5hA+frofbVj1P0oObxsQAvb5bEa28pQS9JXVUtKRk8eGjpv7y3sJQlAcWC8wxuGn6yH1p1hu8R1vd+++BFzWy1/7pqFLcb/sgxpMF2dfMn8oroExGL7gflCJhONGPWzisBrfgLNdeUvNvtO6BuQPgOICTCO5wOqvQRy9hCQA57dxb+tkelN6irQK+RI1Mx1exGfxe6lUFvyrzgJn8lVLMmxtDvVxLYNi140Q37OMaaeqtSJ9zRbT3/yOWXOWKL8MA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=aspeedtech.com header.i="@aspeedtech.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
- Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=aspeedtech.com;
- Cc: "kraxel@xxxxxxxxxx" <kraxel@xxxxxxxxxx>, "marcandre.lureau@xxxxxxxxxx" <marcandre.lureau@xxxxxxxxxx>, "clg@xxxxxxxx" <clg@xxxxxxxx>, "pierrick.bouvier@xxxxxxxxxxxxxxxx" <pierrick.bouvier@xxxxxxxxxxxxxxxx>, "peter.maydell@xxxxxxxxxx" <peter.maydell@xxxxxxxxxx>, Kane Chen <kane_chen@xxxxxxxxxxxxxx>, "philmd@xxxxxxxxxxxxxxxx" <philmd@xxxxxxxxxxxxxxxx>, "kfting@xxxxxxxxxxx" <kfting@xxxxxxxxxxx>, "wuhaotsh@xxxxxxxxxx" <wuhaotsh@xxxxxxxxxx>, "zhao1.liu@xxxxxxxxx" <zhao1.liu@xxxxxxxxx>, "richard.henderson@xxxxxxxxxx" <richard.henderson@xxxxxxxxxx>, "deller@xxxxxx" <deller@xxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "anthony@xxxxxxxxxxxxxx" <anthony@xxxxxxxxxxxxxx>, "edgar.iglesias@xxxxxxxxx" <edgar.iglesias@xxxxxxxxx>, Troy Lee <troy_lee@xxxxxxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, "qemu-arm@xxxxxxxxxx" <qemu-arm@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 09 Nov 2026 02:57:35 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHdaquqR4kcpf7BW0WY0PXfmYQ09LccaG6AgAiuDZA=
- Thread-topic: [PATCH v8 14/18] hw/usb/redirect-server: Implement control transfers
Hi Junjie,
> transfers
>
> 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
Thanks for the review and suggestion.
Will fix it.
Jamin
|