From nobody Fri Jun 26 00:51:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gmcZB4zkWz6jfbS for ; Fri, 26 Jun 2026 00:51:46 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gmcZB4Cf5z413r for ; Fri, 26 Jun 2026 00:51:46 +0000 (UTC) (envelope-from lwhsu@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782435106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q/MResXVMZtMYqL/bNE9OKAwnM2BtQtOSqtLDcFpUww=; b=mpTe5bFmZbYgfYiT/CMeb3bYI3krVBl1UvQyqycjkLoTNKRDbofF8KMGjYemKUzTk3Ov66 oKmAyDAttn2ZRisf2PR9KRrICZ+iSqC3k82x+KAElAWa06VJAWjbf1O/jehlP5wU16meGM SD/p+2q0elGFGGRWH+5P+v68HZnDT3gUiQyPcZiyA9BlqWkbYEUxbBhhQu1oZsY5dzfuwm n0B9GhFKvCWtZBcMWhHjo4/XWAoxAq0z5N3Mh+9khp35B49+frau0DqSSGfoEpBmTPjJHF 8ZYdBxXzwnLV+ztG9hK7g+LkWckOu/baz7phx3RHSaAoICVW660CfRHoPe7/Ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782435106; a=rsa-sha256; cv=none; b=MuaLLebqLQ+YQ/ZIDY2MVJj3Wi4GUyp5NxWbhw0SWRyP/Jxmd3TK4LVs5wXRMXyirhQy0b TZYZrN1CUsWJRImhxOs6fYsHOx+zevIQHlZgsB6MeBsRJDiZfY3hjqWEMrt5sekXhtwBQn oR9yEl2taNGYdZhCrc+SIoNxpUBjC08S9tW8a3CCYoT17LSopiiadZvW2q47abKZTBjYF5 VuOwM0+LN3VgJZ5sQxYNWKK/vBy7uPFiqoHgHr/iITDb2k8URcGFTroJcBCUleDs1qCUrM n0Eyu7RsEHcJ1Dm0Wen3fbjoArMhwSOY1SVf0/Oa0+a+oByhtze2zSCy1HrJkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782435106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q/MResXVMZtMYqL/bNE9OKAwnM2BtQtOSqtLDcFpUww=; b=qJMG5PvsL7+slEA6Xd3kRdpWCQuzeuaSjBOT6gfi0zhaSqWBcWC9nam4QR4srFFWmIZzXx wptUXcU6LXiNQBCkxuZXNf/omsK5a8SlxgBUfL+gbGFEYiyg+tMfGtFePlRxn4wBnLzj6u EyWZsBDTmT3SLLp9Fe+ot/Ps1M/VG7qv079yEEB9pGMBFHCFEQ9ENotcHupH6u5NEvPq4L xgGr0xeocfihNBJWYqFyrxADM7oG9JmtvsXCQrIaKbL+0LgM+zJhZAXflrqYZ+1LuGdJ/m uxlnEl4Sns3xm4tkLQgxG8eVb80kD4RJrfW+mWMX9wIUgQaYjNlvTNVPOmxpdg== Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: lwhsu/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gmcZB2VhCz19lP for ; Fri, 26 Jun 2026 00:51:46 +0000 (UTC) (envelope-from lwhsu@freebsd.org) Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-697564cb69eso736579a12.0 for ; Thu, 25 Jun 2026 17:51:46 -0700 (PDT) X-Forwarded-Encrypted: i=1; AFNElJ+wtQaI4VJwQVGGF5Eg6X7tAico77SFf9GcNA6Vj0MFLOP072wriQ5jPDeLQRklgaHMZozQ/R7/MCMjCDw6dGLTqx1f@freebsd.org X-Gm-Message-State: AOJu0YztBEvgsFDT+MdLc+cKzE7oz6Lde6AkXmdD1QAxFHPTnCqWUi2y rQKOczhCQbG030Je/IKXX79opIIRbGAdRta1OrhQrlW+UvbDt4d6Z1ry4hmN+uQ2LC+6BhumkBQ 3xAkVuiDyiA+df0Ff1lrHJhc4Py1NaD0= X-Received: by 2002:a17:906:eec1:b0:c0d:43b2:e8e7 with SMTP id a640c23a62f3a-c1205ee0e4bmr318720066b.35.1782435105157; Thu, 25 Jun 2026 17:51:45 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a3db409.32d11.15fc5b49@gitrepo.freebsd.org> In-Reply-To: <6a3db409.32d11.15fc5b49@gitrepo.freebsd.org> From: Li-Wen Hsu Date: Thu, 25 Jun 2026 21:51:33 -0300 X-Gmail-Original-Message-ID: X-Gm-Features: AVVi8CeKFqxFnuwOX8UlpgGChVw3R7bclB3HxsAFFR3RPAEYyiye9ogUvoriyyU Message-ID: Subject: Re: git: 240330a85e5f - main - libusb: don't treat EINVAL from USB_FS_COMPLETE as device detach To: ShengYi Hung Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000047389806551d834c" --00000000000047389806551d834c Content-Type: text/plain; charset="UTF-8" On Thu, Jun 25, 2026 at 20:05 ShengYi Hung wrote: > The branch main has been updated by aokblast: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=240330a85e5f7f5d448123902ebee4136ef221fd > > commit 240330a85e5f7f5d448123902ebee4136ef221fd > Author: ShengYi Hung > AuthorDate: 2026-06-25 22:38:17 +0000 > Commit: ShengYi Hung > CommitDate: 2026-06-25 22:58:23 +0000 > > libusb: don't treat EINVAL from USB_FS_COMPLETE as device detach > > ugen20_process() treats any non-EBUSY errno returned by USB_FS_COMPLETE > as device detach and returns LIBUSB20_ERROR_OTHER. This causes libusb10 > to set device_is_gone and fail all subsequent transfer with > LIBUSB_ERROR_NO_DEVICE. > > However, USB_FS_COMPLETE can also return EINVAL when a completion > references an endpoint that no longer exists, for example after > SET_INTERFACE or SET_CONFIG removes and recreates endpoints. This is a > transient condition and does not indicate device detach. > > Treat EINVAL the same as EBUSY and stop draining completions. This > prevents a guest selecting an isochronous streaming altsetting from > permanently breaking the passed-through device. > > Reviewed by: bapt > Event: Halifax Hackathon 202606 > Location: Peggy's Cove Rock They really push the commit at the cove: https://p.obiw.ac/s/aokblast-peggy > --00000000000047389806551d834c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jun 25, 2026 at 20:05 ShengYi Hung <aokblast@freebsd.org> wrote:
=
The branch main has been updated by aokblast:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D240330a85e5f7f5d448123902ebee4136ef221fd
commit 240330a85e5f7f5d448123902ebee4136ef221fd
Author:=C2=A0 =C2=A0 =C2=A0ShengYi Hung <aokblast@FreeBSD.org>
AuthorDate: 2026-06-25 22:38:17 +0000
Commit:=C2=A0 =C2=A0 =C2=A0ShengYi Hung <aokblast@FreeBSD.org>
CommitDate: 2026-06-25 22:58:23 +0000

=C2=A0 =C2=A0 libusb: don't treat EINVAL from USB_FS_COMPLETE as device= detach

=C2=A0 =C2=A0 ugen20_process() treats any non-EBUSY errno returned by USB_F= S_COMPLETE
=C2=A0 =C2=A0 as device detach and returns LIBUSB20_ERROR_OTHER. This cause= s libusb10
=C2=A0 =C2=A0 to set device_is_gone and fail all subsequent transfer with =C2=A0 =C2=A0 LIBUSB_ERROR_NO_DEVICE.

=C2=A0 =C2=A0 However, USB_FS_COMPLETE can also return EINVAL when a comple= tion
=C2=A0 =C2=A0 references an endpoint that no longer exists, for example aft= er
=C2=A0 =C2=A0 SET_INTERFACE or SET_CONFIG removes and recreates endpoints. = This is a
=C2=A0 =C2=A0 transient condition and does not indicate device detach.

=C2=A0 =C2=A0 Treat EINVAL the same as EBUSY and stop draining completions.= This
=C2=A0 =C2=A0 prevents a guest selecting an isochronous streaming altsettin= g from
=C2=A0 =C2=A0 permanently breaking the passed-through device.

=C2=A0 =C2=A0 Reviewed by:=C2=A0 =C2=A0 bapt
=C2=A0 =C2=A0 Event:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Halifax Hackathon 20= 2606
=C2=A0 =C2=A0 Location:=C2=A0 =C2=A0 =C2=A0 =C2=A0Peggy's Cove Rock

They really push the= commit at the cove:

--00000000000047389806551d834c--